Process creation

The process manager component of procnto is responsible for process creation. If a process wants to create another process, it makes a call to one of the process-creation functions, which then effectively sends a message to the process manager.

Here are the process-creation functions:

Note: It's possible to call fork() from a multithreaded process, but it can be very difficult to do so safely, so we recommend that you call it only from single-threaded processes. For more information, see Using fork() in a multithreaded process in the “Processes and Threads” chapter of Getting Started with QNX Neutrino.

There are several versions of spawn*() and exec*(); the asterisk represents one to three letters, where:

For details on each of these functions, see their entries in the QNX Neutrino C Library Reference, as well as the Processes and Threads chapter of Getting Started with QNX Neutrino. Here we'll mention some of the things common to many of them.

When you start a new process, it replaces the existing process if:

The calling thread in the existing process is suspended while the new process executes (control continues at the point following the place where the new process was started) in the following situations: