1<assertions> 2 <assertion id="1" tag="ref:XSH6TC2:12992:12992"> 3 fork() creates a new process. 4 </assertion> 5 <assertion id="2" tag="ref:XSH6TC2:12992:12993"> 6 The new process is a copy of the original process 7 -- unless specified otherwise below. 8 </assertion> 9 <assertion id="3" tag="ref:XSH6TC2:12994:12995"> 10 The new process' ID does not match any existing 11 process or group ID. 12 </assertion> 13 <assertion id="4" tag="ref:XSH6TC2:12996:12997"> 14 The parent process ID (ppid) of the child process 15 is the process ID (pid) of the parent process 16 (caller of fork()). 17 </assertion> 18 <assertion id="5" tag="ref:XSH6TC2:12998:13000"> 19 The opened file descriptors are copied to the child process 20 and refer to the same object. 21 </assertion> 22 <assertion id="6" tag="ref:XSH6TC2:13001:13003"> 23 The opened directory streams are copied to the child process. 24 Positioning information may be shared between both processes. 25 </assertion> 26 <assertion id="7" tag="ref:XSH6TC2:13004:13004 pt:XSI"> 27 The child process gets a copy of the parent message catalog descriptor. 28 </assertion> 29 <assertion id="8" tag="ref:XSH6TC2:13005:13005"> 30 tms_utime, tms_stime, tms_cutime, and tms_cstime values 31 are set to 0 in the child process. 32 </assertion> 33 <assertion id="9" tag="ref:XSH6TC2:13006:13007"> 34 The time left until an alarm clock signal is reset to zero, 35 and the alarm, if any, is canceled. 36 </assertion> 37 <assertion id="10" tag="ref:XSH6TC2:13008:13008 pt:XSI"> 38 semadj values are cleared. 39 </assertion> 40 <assertion id="11" tag="ref:XSH6TC2:13009:13009"> 41 The file locks are not inherited by the child process. 42 </assertion> 43 <assertion id="12" tag="ref:XSH6TC2:13010:13010"> 44 The child process is created with no pending signals. 45 </assertion> 46 <assertion id="13" tag="ref:XSH6TC2:13011:13011 pt:XSI"> 47 Interval timers are reset in the child process. 48 </assertion> 49 <assertion id="14" tag="ref:XSH6TC2:13012:13012 pt:SEM"> 50 The opened semaphores are inherited in the child process. 51 </assertion> 52 <assertion id="15" tag="ref:XSH6TC2:13013:13014 pt:ML"> 53 The child process does not inherit memory locks set by 54 the parent process with mlock or mlockall. 55 </assertion> 56 <assertion id="16" tag="ref:XSH6TC2:13015:13021 pt:MF|SHM"> 57 Memory mappings created in the parent are retained in the 58 child process. If the mapping is MAP_PRIVATE, any modification 59 done after the fork() is visible only to the process doing the 60 modification. 61 </assertion> 62 <assertion id="17" tag="ref:XSH6TC2:13022:13024 pt:PS"> 63 For the SCHED_RR and SCHED_FIFO scheduling policies, the child 64 process inherits the policy and priority settings of the parent 65 process during the fork() execution. 66 </assertion> 67 <assertion id="18" tag="ref:XSH6TC2:13025:13025 pt:TMR"> 68 The per-process timers are not inherited. 69 </assertion> 70 <assertion id="19" tag="ref:XSH6TC2:13026:13028 pt:MSG"> 71 The opened message queue descriptors are copied to the child 72 process and refer to the same object. 73 </assertion> 74 <assertion id="20" tag="ref:XSH6TC2:13029:13030 pt:AIO"> 75 Asynchronous IO operations are not inherited by the child. 76 </assertion> 77 <assertion id="21" tag="ref:XSH6TC2:13031:13036 pt:THR"> 78 The new process has only one thread. 79 </assertion> 80 <assertion id="22" tag="ref:XSH6TC2:13052:13053 pt:CPT_TCT"> 81 The CPU-time clocks of the new process/ new process' thread 82 are initialized to 0. 83 </assertion> 84 <assertion id="23" tag="ref:XSH6TC2:13060:13062"> 85 fork() returns 0 to the child and the child PID to the parent process when 86 succesful. 87 </assertion> 88 <assertion id="24" tag="ref:XSH6TC2:13063:13069"> 89 fork() returns -1, errno is set to EAGAIN, and no child process 90 is created if the system lacks a resource to create the new process 91 or CHILD_MAX process are already running. 92 </assertion> 93</assertions> 94