Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8823223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T06:17:57+00:00 2026-06-14T06:17:57+00:00

When using a fork() function in a program which is running in a Unix

  • 0

When using a fork() function in a program which is running in a Unix like operating system (i.e MINIX 3) does it create a number of separate processes which are handled independently and can therefore finish ahead of each other (which is actually what I want) or will it create a series of sequential processes which only finish in the order they were created.

Here is the code I’m using to fork()

    for(j = 0; j < num_fork_loops;) {
       if (fork() < 0) {
          printf("Fork has failed\n");
          exit(EXIT_FAILURE);
       }
       j++;
     }

Thanks for your time

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T06:17:59+00:00Added an answer on June 14, 2026 at 6:17 am

    fork() returns immediately, twice. All processes are normal, running processes, which are scheduled separately by the OS. Typically they will all run simultaneously.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote a little program using fork to create new processes which use pipe
How does the Child process generate using Fork() function. For example: A process execute
I read an exec'd program's stdout using a pipe: int pipes[2]; pipe(pipes); if (fork()
I am using the DataZombies fork of jqtouch to create an indexed list. I
I have a program which runs two different operations and i'd like to share
I have to write program that create process using pipe() . My first task
I am trying to create a function which takes a shell command as an
I'm using fork() on Perl on Windows (ActivePerl) for a basic socket server, but
Is it possible to implement some kind of timeout (time limit) for fork using
I'm using Telligent's RSS.Net fork to parse an XML Stream. The stream is well-formed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.