[2d19ed6c] | 1 | @c |
---|
| 2 | @c COPYRIGHT (c) 1988-1998. |
---|
| 3 | @c On-Line Applications Research Corporation (OAR). |
---|
| 4 | @c All rights reserved. |
---|
| 5 | @c |
---|
| 6 | @c $Id$ |
---|
| 7 | @c |
---|
| 8 | |
---|
| 9 | @chapter Process Primitives |
---|
[0874502] | 10 | |
---|
[2d19ed6c] | 11 | @section Process Creation and Execution |
---|
[0874502] | 12 | |
---|
[2d19ed6c] | 13 | @subsection Process Creation |
---|
[0874502] | 14 | |
---|
| 15 | @example |
---|
[34683fee] | 16 | fork(), Function, Unimplementable |
---|
[0874502] | 17 | @end example |
---|
| 18 | |
---|
| 19 | |
---|
[2d19ed6c] | 20 | @subsection Execute a File |
---|
[0874502] | 21 | |
---|
| 22 | @example |
---|
[34683fee] | 23 | execl(), Function, Unimplementable, Requires Processes |
---|
| 24 | execv(), Function, Unimplementable, Requires Processes |
---|
| 25 | execle(), Function, Unimplementable, Requires Processes |
---|
| 26 | execve(), Function, Unimplementable, Requires Processes |
---|
| 27 | execlp(), Function, Unimplementable, Requires Processes |
---|
| 28 | execvp(), Function, Unimplementable, Requires Processes |
---|
[0874502] | 29 | @end example |
---|
| 30 | |
---|
[2d19ed6c] | 31 | @subsection Register Fork Handlers |
---|
[0874502] | 32 | |
---|
| 33 | @example |
---|
[34683fee] | 34 | pthread_atfork(), Function, Unimplementable, Requires Processes |
---|
[0874502] | 35 | @end example |
---|
| 36 | |
---|
[2d19ed6c] | 37 | @section Process Termination |
---|
[0874502] | 38 | |
---|
[2d19ed6c] | 39 | @subsection Wait for Process Termination |
---|
[0874502] | 40 | |
---|
| 41 | @example |
---|
[34683fee] | 42 | wait(), Function, Unimplementable, Requires Processes |
---|
| 43 | waitpid(), Function, Unimplementable, Requires Processes |
---|
[7331714] | 44 | WNOHANG, Constant, Unimplementable, Requires Processes |
---|
| 45 | WUNTRACED, Constant, Unimplementable, Requires Processes |
---|
| 46 | WIFEXITED(), Function, Unimplementable, Requires Processes |
---|
| 47 | WEXITSTATUS(), Function, Unimplementable, Requires Processes |
---|
| 48 | WIFSIGNALED(), Function, Unimplementable, Requires Processes |
---|
| 49 | WTERMSIG(), Function, Unimplementable, Requires Processes |
---|
| 50 | WIFSTOPPED(), Function, Unimplementable, Requires Processes |
---|
| 51 | WSTOPSIG(), Function, Unimplementable, Requires Processes |
---|
[0874502] | 52 | @end example |
---|
| 53 | |
---|
[2d19ed6c] | 54 | @subsection Terminate a Process |
---|
[0874502] | 55 | |
---|
| 56 | @example |
---|
[34683fee] | 57 | _exit(), Function, Unimplemented |
---|
[0874502] | 58 | @end example |
---|
| 59 | |
---|
[2d19ed6c] | 60 | @section Signals |
---|
[0874502] | 61 | |
---|
[2d19ed6c] | 62 | @subsection Signal Concepts |
---|
[0874502] | 63 | |
---|
[7331714] | 64 | @subsubsection Signal Names |
---|
| 65 | |
---|
[3349409] | 66 | @example |
---|
[6984a19] | 67 | sigset_t, Type, Implemented |
---|
[7331714] | 68 | SIG_DFL, Constant, |
---|
| 69 | SIG_IGN, Constant, |
---|
| 70 | SIGABRT, Constant, |
---|
| 71 | SIGALRM, Constant, |
---|
| 72 | SIGFPE, Constant, |
---|
| 73 | SIGHUP, Constant, |
---|
| 74 | SIGILL, Constant, |
---|
| 75 | SIGINT, Constant, |
---|
| 76 | SIGKILL, Constant, |
---|
| 77 | SIGPIPE, Constant, |
---|
| 78 | SIGQUIT, Constant, |
---|
| 79 | SIGSEGV, Constant, |
---|
| 80 | SIGTERM, Constant, |
---|
| 81 | SIGUSR1, Constant, |
---|
| 82 | SIGUSR2, Constant, |
---|
| 83 | SIGCHLD, Constant, |
---|
| 84 | SIGCONT, Constant, |
---|
| 85 | SIGSTOP, Constant, |
---|
| 86 | SIGTSTP, Constant, |
---|
| 87 | SIGTTIN, Constant, |
---|
| 88 | SIGTTOU, Constant, |
---|
| 89 | SIGBUS, Constant, |
---|
| 90 | SIGRTMIN, Constant, |
---|
| 91 | SIGRTMAX, Constant, |
---|
| 92 | @end example |
---|
| 93 | |
---|
| 94 | @subsubsection Signal Generation and Delivery |
---|
| 95 | |
---|
| 96 | @example |
---|
[6984a19] | 97 | struct sigevent, Type, Implemented |
---|
| 98 | union sigval, Type, Implemented |
---|
[7331714] | 99 | SIGEV_NONE, Constant, |
---|
| 100 | SIGEV_SIGNAL, Constant, |
---|
| 101 | SIGEV_THREAD, Constant, |
---|
| 102 | @end example |
---|
| 103 | |
---|
| 104 | @subsubsection Signal Actions |
---|
| 105 | |
---|
| 106 | @example |
---|
[6984a19] | 107 | siginfo_t, Type, Implemented |
---|
[7331714] | 108 | SI_USER, Constant, |
---|
| 109 | SI_QUEUE, Constant, |
---|
| 110 | SI_TIMER, Constant, |
---|
| 111 | SI_ASYNCIO, Constant, |
---|
| 112 | SI_MESGQ, Constant, |
---|
[3349409] | 113 | @end example |
---|
| 114 | |
---|
[2d19ed6c] | 115 | @subsection Send a Signal to a Process |
---|
[0874502] | 116 | |
---|
| 117 | @example |
---|
[34683fee] | 118 | kill(), Function, Implemented |
---|
[0874502] | 119 | @end example |
---|
| 120 | |
---|
[2d19ed6c] | 121 | @subsection Manipulate Signal Sets |
---|
[0874502] | 122 | |
---|
| 123 | @example |
---|
[34683fee] | 124 | sigemptyset(), Function, Implemented |
---|
| 125 | sigfillset(), Function, Implemented |
---|
| 126 | sigaddset(), Function, Implemented |
---|
| 127 | sigdelset(), Function, Implemented |
---|
| 128 | sigismember(), Function, Implemented |
---|
[0874502] | 129 | @end example |
---|
| 130 | |
---|
[2d19ed6c] | 131 | @subsection Examine and Change Signal Action |
---|
[0874502] | 132 | |
---|
| 133 | @example |
---|
[34683fee] | 134 | sigaction(), Function, Implemented |
---|
[6984a19] | 135 | sigaction, Type, Implemented |
---|
[7331714] | 136 | SA_NOCLDSTOP, Constant, |
---|
| 137 | SA_SIGINFO, Constant, |
---|
[0874502] | 138 | @end example |
---|
| 139 | |
---|
[2d19ed6c] | 140 | @subsection Examine and Change Blocked Signals |
---|
[0874502] | 141 | |
---|
| 142 | @example |
---|
[34683fee] | 143 | pthread_sigmask(), Function, Implemented |
---|
| 144 | sigprocmask(), Function, Implemented |
---|
[7331714] | 145 | SIG_BLOCK, Constant, |
---|
| 146 | SIG_UNBLOCK, Constant, |
---|
| 147 | SIG_SETMASK, Constant, |
---|
[0874502] | 148 | @end example |
---|
| 149 | |
---|
[2d19ed6c] | 150 | @subsection Examine Pending Signals |
---|
[0874502] | 151 | |
---|
| 152 | @example |
---|
[34683fee] | 153 | sigpending(), Function, Implemented |
---|
[0874502] | 154 | @end example |
---|
| 155 | |
---|
[2d19ed6c] | 156 | @subsection Wait for a Signal |
---|
[0874502] | 157 | |
---|
| 158 | @example |
---|
[34683fee] | 159 | sigsuspend(), Function, Implemented |
---|
[0874502] | 160 | @end example |
---|
| 161 | |
---|
[2d19ed6c] | 162 | @subsection Synchronously Accept a Signal |
---|
[0874502] | 163 | |
---|
| 164 | @example |
---|
[34683fee] | 165 | sigwait(), Function, Implemented |
---|
| 166 | sigwaitinfo(), Function, Implemented |
---|
| 167 | sigtimedwait(), Function, Implemented |
---|
[0874502] | 168 | @end example |
---|
| 169 | |
---|
[2d19ed6c] | 170 | @subsection Queue a Signal to a Process |
---|
[0874502] | 171 | |
---|
| 172 | @example |
---|
[34683fee] | 173 | sigqueue(), Function, Implemented |
---|
[0874502] | 174 | @end example |
---|
| 175 | |
---|
[2d19ed6c] | 176 | @subsection Send a Signal to a Thread |
---|
[0874502] | 177 | |
---|
| 178 | @example |
---|
[34683fee] | 179 | pthread_kill(), Function, Implemented |
---|
[0874502] | 180 | @end example |
---|
| 181 | |
---|
[2d19ed6c] | 182 | @section Timer Operations |
---|
[0874502] | 183 | |
---|
[2d19ed6c] | 184 | @subsection Schedule Alarm |
---|
[0874502] | 185 | |
---|
| 186 | @example |
---|
[34683fee] | 187 | alarm(), Function, Implemented |
---|
[0874502] | 188 | @end example |
---|
| 189 | |
---|
[2d19ed6c] | 190 | @subsection Suspend Process Execution |
---|
[0874502] | 191 | |
---|
| 192 | @example |
---|
[34683fee] | 193 | pause(), Function, Implemented |
---|
[0874502] | 194 | @end example |
---|
| 195 | |
---|
[2d19ed6c] | 196 | @subsection Delay Process Execution |
---|
| 197 | |
---|
[0874502] | 198 | @example |
---|
[34683fee] | 199 | sleep(), Function, Implemented |
---|
[0874502] | 200 | @end example |
---|