vuoi
o PayPal
tutte le volte che vuoi
fork - create a new process
The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group
NAME
fork - create a new process
SYNOPSIS
#include <sys/types.h>
#include <unistd.h>
pid_t fork(void);
DESCRIPTION
The fork() function creates a new process. The new process (child process) is an exact copy of the calling process (parent process) except as detailed below.
The child process has a unique process ID.
The child process ID also does not match any active process group ID.
The child process has a different parent process ID (that is, the process ID of the parent process).
The child process has its own copy of the parent's file descriptors. Each of the child's file descriptors refers to the same open file description with the corresponding file descriptor of the parent.
The child process has its own copy of the parent's open directory streams. Each open directory stream in the child process may share directory stream
positioning with the corresponding directory stream of the parent.
The child process may have its own copy of the parent's message catalogue descriptors.
The child process' values of tms_utime, tms_stime, tms_cutime and tms_cstime are set to 0.
The time left until an alarm clock signal is reset to 0.
All semadj values are cleared.
File locks set by the parent process are not inherited by the child process.
The set of signals pending for the child process is initialised to the empty set.
Interval timers are reset in the child process.
If the Semaphores option is supported, any semaphores that are open in the parent process will also be open in the child process.
If the Process Memory Locking option is supported, the child process does not inherit any address space memory locks established by the parent process via calls to