fork() call
To find out if an operating system might support the POSIX®.1 specification, ask
"Does it support the fork() call?"
Fork() calls are scattered throughout Unix®/Linux® code. To support
fork(), an operating system must first support the concept of parent-child relationships
between processes. If fork() and other common POSIX.1 calls are not supported, the vast majority
of your Unix/Linux code will not port to that operating system without major rewrites.
fork() The fork() system call creates a new process called a child. The original
process is called the parent, and the child is a near-exact copy of the parent. The child's run time is
set to zero and file locks are not inherited.
The child has its own process ID and its own copy of the parent's file descriptors.
A parent process can recover the exit status of a child using the wait()
or waitpid() function.
A savvy engineer just needs to ask a few quick questions about an operating system in order to determine if it might fully support the POSIX standards. |
![]() |
Copyright © LynuxWorks™, Inc. All rights reserved. Reproduction in whole or in part in any form or medium without express written permission of LynuxWorks is prohibited. | 20 years of embedded excellence |