[20] | 1 | strace of "sleep 1 | sleep 2" being run from interactive bash 3.0 |
---|
| 2 | |
---|
| 3 | |
---|
| 4 | Synopsis: |
---|
| 5 | open /dev/tty [, if fails, open ttyname(0)]; close /* helps re-establish ctty */ |
---|
| 6 | get current signal mask |
---|
| 7 | TCGETS on fd# 0 |
---|
| 8 | TCGETS on fd# 2 /* NB: if returns ENOTTY (2>/dev/null), sh seems to disable job control, |
---|
| 9 | does not show prompt, but still executes cmds from fd# 0 */ |
---|
| 10 | install default handlers for CHLD QUIT TERM |
---|
| 11 | install common handler for HUP INT ILL TRAP ABRT FPE BUS SEGV SYS PIPE ALRM TERM XCPU XFSZ VTALRM USR1 USR2 |
---|
| 12 | ignore QUIT |
---|
| 13 | install handler for INT |
---|
| 14 | ignore TERM |
---|
| 15 | install handler for INT |
---|
| 16 | ignore TSTP TTOU TTIN |
---|
| 17 | install handler for WINCH |
---|
| 18 | get pid, ppid |
---|
| 19 | block all signals |
---|
| 20 | unblock all signals |
---|
| 21 | get our pprocess group |
---|
| 22 | minidoc: |
---|
| 23 | Each process group is a member of a session and each process is a member |
---|
| 24 | of the session of which its process group is a member. |
---|
| 25 | Process groups are used for distribution of signals, and by terminals |
---|
| 26 | to arbitrate requests for their input: processes that have the same |
---|
| 27 | process group as the terminal are foreground and may read, while others |
---|
| 28 | will block with a signal if they attempt to read. These calls are thus used |
---|
| 29 | by programs (shells) to create process groups in implementing job control. |
---|
| 30 | The TIOCGPGRP and TIOCSPGRP calls described in termios(3) are used to get/set |
---|
| 31 | the process group of the control terminal. |
---|
| 32 | If a session has a controlling terminal, CLOCAL is not set and a hangup occurs, |
---|
| 33 | then the session leader is sent a SIGHUP. If the session leader exits, |
---|
| 34 | the SIGHUP signal will be sent to each process in the foreground process |
---|
| 35 | group of the controlling terminal. |
---|
| 36 | If the exit of the process causes a process group to become orphaned, |
---|
| 37 | and if any member of the newly-orphaned process group is stopped, then a SIGHUP |
---|
| 38 | signal followed by a SIGCONT signal will be sent to each process |
---|
| 39 | in the newly-orphaned process group. |
---|
| 40 | ... |
---|
| 41 | dup stderr to fd# 255 |
---|
| 42 | move ourself to our own process group |
---|
| 43 | block CHLD TSTP TTIN TTOU |
---|
| 44 | set tty's (255, stderr's) foreground process group to our group |
---|
| 45 | allow all signals |
---|
| 46 | mark 255 CLOEXEC |
---|
| 47 | set CHLD handler |
---|
| 48 | get signal mask |
---|
| 49 | get fd#0 flags |
---|
| 50 | get signal mask |
---|
| 51 | set INT handler |
---|
| 52 | block CHLD TSTP TTIN TTOU |
---|
| 53 | set fd #255 foreground process group to our group |
---|
| 54 | allow all signals |
---|
| 55 | set INT handler |
---|
| 56 | block all signals |
---|
| 57 | allow all signals |
---|
| 58 | block INT |
---|
| 59 | allow all signals |
---|
| 60 | lotsa sigactions: set INT,ALRM,WINCH handlers, ignore TERM,QUIT,TSTP,TTOU,TTIN |
---|
| 61 | block all signals |
---|
| 62 | allow all signals |
---|
| 63 | block all signals |
---|
| 64 | allow all signals |
---|
| 65 | block all signals |
---|
| 66 | allow all signals |
---|
| 67 | read "sleep 1 | sleep 2\n" |
---|
| 68 | block INT |
---|
| 69 | TCSETSW on fd# 0 |
---|
| 70 | allow all signals |
---|
| 71 | lotsa sigactions: set INT,ALRM,WINCH handlers, ignore TERM,QUIT,TSTP,TTOU,TTIN |
---|
| 72 | block CHLD |
---|
| 73 | pipe([4, 5]) /* oops seems I lost another pipe() in editing... */ |
---|
| 74 | fork child #1 |
---|
| 75 | put child in it's own process group |
---|
| 76 | block only CHLD |
---|
| 77 | close(5) |
---|
| 78 | block only INT CHLD |
---|
| 79 | fork child #2 |
---|
| 80 | put child in the same process group as first one |
---|
| 81 | block only CHLD |
---|
| 82 | close(4) |
---|
| 83 | block only CHLD |
---|
| 84 | block only CHLD TSTP TTIN TTOU |
---|
| 85 | set fd# 255 foreground process group to first child's one |
---|
| 86 | block only CHLD |
---|
| 87 | block only CHLD |
---|
| 88 | block only CHLD |
---|
| 89 | /* note: because shell is not in foreground now, e.g. Ctrl-C will send INT to children only! */ |
---|
| 90 | wait4 for children to die or stop - first child exits |
---|
| 91 | wait4 for children to die or stop - second child exits |
---|
| 92 | block CHLD TSTP TTIN TTOU |
---|
| 93 | set fd# 255 foreground process group to our own one |
---|
| 94 | block only CHLD |
---|
| 95 | block only CHLD |
---|
| 96 | block nothing |
---|
| 97 | --- SIGCHLD (Child exited) @ 0 (0) --- |
---|
| 98 | wait for it - no child (already waited for) |
---|
| 99 | sigreturn() |
---|
| 100 | read signal mask |
---|
| 101 | lotsa sigactions... |
---|
| 102 | read next command |
---|
| 103 | |
---|
| 104 | |
---|
| 105 | execve("/bin/sh", ["sh"], [/* 34 vars */]) = 0 |
---|
| 106 | rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 |
---|
| 107 | ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 |
---|
| 108 | ioctl(2, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 |
---|
| 109 | rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0 |
---|
| 110 | rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_DFL}, 8) = 0 |
---|
| 111 | rt_sigaction(SIGTERM, {SIG_DFL}, {SIG_DFL}, 8) = 0 |
---|
| 112 | rt_sigaction(SIGHUP, {0x808f752, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x6ff7a4f8}, {SIG_DFL}, 8) = 0 |
---|
| 113 | rt_sigaction(SIGINT, {0x808f752, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x6ff7a4f8}, {SIG_DFL}, 8) = 0 |
---|
| 114 | rt_sigaction(SIGILL, {0x808f752, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x6ff7a4f8}, {SIG_DFL}, 8) = 0 |
---|
| 115 | rt_sigaction(SIGTRAP, {0x808f752, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x6ff7a4f8}, {SIG_DFL}, 8) = 0 |
---|
| 116 | rt_sigaction(SIGABRT, {0x808f752, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x6ff7a4f8}, {SIG_DFL}, 8) = 0 |
---|
| 117 | rt_sigaction(SIGFPE, {0x808f752, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x6ff7a4f8}, {SIG_DFL}, 8) = 0 |
---|
| 118 | rt_sigaction(SIGBUS, {0x808f752, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x6ff7a4f8}, {SIG_DFL}, 8) = 0 |
---|
| 119 | rt_sigaction(SIGSEGV, {0x808f752, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x6ff7a4f8}, {SIG_DFL}, 8) = 0 |
---|
| 120 | rt_sigaction(SIGSYS, {0x808f752, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x6ff7a4f8}, {SIG_DFL}, 8) = 0 |
---|
| 121 | rt_sigaction(SIGPIPE, {0x808f752, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x6ff7a4f8}, {SIG_DFL}, 8) = 0 |
---|
| 122 | rt_sigaction(SIGALRM, {0x808f752, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x6ff7a4f8}, {SIG_DFL}, 8) = 0 |
---|
| 123 | rt_sigaction(SIGTERM, {0x808f752, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x6ff7a4f8}, {SIG_DFL}, 8) = 0 |
---|
| 124 | rt_sigaction(SIGXCPU, {0x808f752, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x6ff7a4f8}, {SIG_DFL}, 8) = 0 |
---|
| 125 | rt_sigaction(SIGXFSZ, {0x808f752, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x6ff7a4f8}, {SIG_DFL}, 8) = 0 |
---|
| 126 | rt_sigaction(SIGVTALRM, {0x808f752, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x6ff7a4f8}, {SIG_DFL}, 8) = 0 |
---|
| 127 | rt_sigaction(SIGUSR1, {0x808f752, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x6ff7a4f8}, {SIG_DFL}, 8) = 0 |
---|
| 128 | rt_sigaction(SIGUSR2, {0x808f752, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x6ff7a4f8}, {SIG_DFL}, 8) = 0 |
---|
| 129 | rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 |
---|
| 130 | rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_DFL}, 8) = 0 |
---|
| 131 | rt_sigaction(SIGINT, {0x808f7d7, [], SA_RESTORER, 0x6ff7a4f8}, {0x808f752, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 132 | rt_sigaction(SIGTERM, {SIG_IGN}, {0x808f752, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 133 | rt_sigaction(SIGINT, {0x808f7d7, [], SA_RESTORER, 0x6ff7a4f8}, {0x808f7d7, [], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 134 | rt_sigaction(SIGTSTP, {SIG_IGN}, {SIG_DFL}, 8) = 0 |
---|
| 135 | rt_sigaction(SIGTTOU, {SIG_IGN}, {SIG_DFL}, 8) = 0 |
---|
| 136 | rt_sigaction(SIGTTIN, {SIG_IGN}, {SIG_DFL}, 8) = 0 |
---|
| 137 | rt_sigaction(SIGWINCH, {0x807dc33, [], SA_RESTORER, 0x6ff7a4f8}, {SIG_DFL}, 8) = 0 |
---|
| 138 | getpid() = 19473 |
---|
| 139 | getppid() = 19472 |
---|
| 140 | rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0 |
---|
| 141 | rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 |
---|
| 142 | getpgrp() = 1865 |
---|
| 143 | dup(2) = 4 |
---|
| 144 | fcntl64(255, F_GETFD) = -1 EBADF (Bad file descriptor) |
---|
| 145 | dup2(4, 255) = 255 |
---|
| 146 | close(4) = 0 |
---|
| 147 | ioctl(255, TIOCGPGRP, [1865]) = 0 |
---|
| 148 | getpid() = 19473 |
---|
| 149 | setpgid(0, 19473) = 0 |
---|
| 150 | rt_sigprocmask(SIG_BLOCK, [CHLD TSTP TTIN TTOU], [], 8) = 0 |
---|
| 151 | ioctl(255, TIOCSPGRP, [19473]) = 0 |
---|
| 152 | rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 |
---|
| 153 | fcntl64(255, F_SETFD, FD_CLOEXEC) = 0 |
---|
| 154 | rt_sigaction(SIGCHLD, {0x807c922, [], SA_RESTORER, 0x6ff7a4f8}, {SIG_DFL}, 8) = 0 |
---|
| 155 | rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 |
---|
| 156 | fcntl64(0, F_GETFL) = 0x2 (flags O_RDWR) |
---|
| 157 | ... |
---|
| 158 | rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 |
---|
| 159 | rt_sigaction(SIGINT, {0x808f7d7, [], SA_RESTORER, 0x6ff7a4f8}, {0x808f7d7, [], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 160 | rt_sigprocmask(SIG_BLOCK, [CHLD TSTP TTIN TTOU], [], 8) = 0 |
---|
| 161 | ioctl(255, TIOCSPGRP, [19473]) = 0 |
---|
| 162 | rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 |
---|
| 163 | rt_sigaction(SIGINT, {0x808f7d7, [], SA_RESTORER, 0x6ff7a4f8}, {0x808f7d7, [], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 164 | rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0 |
---|
| 165 | rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 |
---|
| 166 | rt_sigprocmask(SIG_BLOCK, [INT], [], 8) = 0 |
---|
| 167 | rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 |
---|
| 168 | rt_sigaction(SIGINT, {0x80ca530, [], SA_RESTORER, 0x6ff7a4f8}, {0x808f7d7, [], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 169 | rt_sigaction(SIGTERM, {0x80ca530, [], SA_RESTORER, 0x6ff7a4f8}, {SIG_IGN}, 8) = 0 |
---|
| 170 | rt_sigaction(SIGTERM, {SIG_IGN}, {0x80ca530, [], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 171 | rt_sigaction(SIGQUIT, {0x80ca530, [], SA_RESTORER, 0x6ff7a4f8}, {SIG_IGN}, 8) = 0 |
---|
| 172 | rt_sigaction(SIGQUIT, {SIG_IGN}, {0x80ca530, [], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 173 | rt_sigaction(SIGALRM, {0x80ca530, [], SA_RESTORER, 0x6ff7a4f8}, {0x808f752, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 174 | rt_sigaction(SIGTSTP, {0x80ca530, [], SA_RESTORER, 0x6ff7a4f8}, {SIG_IGN}, 8) = 0 |
---|
| 175 | rt_sigaction(SIGTSTP, {SIG_IGN}, {0x80ca530, [], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 176 | rt_sigaction(SIGTTOU, {0x80ca530, [], SA_RESTORER, 0x6ff7a4f8}, {SIG_IGN}, 8) = 0 |
---|
| 177 | rt_sigaction(SIGTTOU, {SIG_IGN}, {0x80ca530, [], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 178 | rt_sigaction(SIGTTIN, {0x80ca530, [], SA_RESTORER, 0x6ff7a4f8}, {SIG_IGN}, 8) = 0 |
---|
| 179 | rt_sigaction(SIGTTIN, {SIG_IGN}, {0x80ca530, [], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 180 | rt_sigaction(SIGWINCH, {0x80ca5cd, [], SA_RESTORER|SA_RESTART, 0x6ff7a4f8}, {0x807dc33, [], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 181 | rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0 |
---|
| 182 | rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 |
---|
| 183 | rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0 |
---|
| 184 | rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 |
---|
| 185 | rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0 |
---|
| 186 | rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 |
---|
| 187 | write(2, "sh-3.00# ", 9) = 9 |
---|
| 188 | rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 |
---|
| 189 | read(0, "s", 1) = 1 |
---|
| 190 | write(2, "s", 1) = 1 |
---|
| 191 | rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 |
---|
| 192 | read(0, "l", 1) = 1 |
---|
| 193 | write(2, "l", 1) = 1 |
---|
| 194 | rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 |
---|
| 195 | ... rest of "sleep 1 | sleep 2" entered... |
---|
| 196 | rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 |
---|
| 197 | read(0, "2", 1) = 1 |
---|
| 198 | write(2, "2", 1) = 1 |
---|
| 199 | rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 |
---|
| 200 | read(0, "\r", 1) = 1 |
---|
| 201 | write(2, "\n", 1) = 1 |
---|
| 202 | rt_sigprocmask(SIG_BLOCK, [INT], [], 8) = 0 |
---|
| 203 | ioctl(0, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig icanon echo ...}) = 0 |
---|
| 204 | rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 |
---|
| 205 | rt_sigaction(SIGINT, {0x808f7d7, [], SA_RESTORER, 0x6ff7a4f8}, {0x80ca530, [], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 206 | rt_sigaction(SIGTERM, {SIG_IGN}, {SIG_IGN}, 8) = 0 |
---|
| 207 | rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_IGN}, 8) = 0 |
---|
| 208 | rt_sigaction(SIGALRM, {0x808f752, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x6ff7a4f8}, {0x80ca530, [], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 209 | rt_sigaction(SIGTSTP, {SIG_IGN}, {SIG_IGN}, 8) = 0 |
---|
| 210 | rt_sigaction(SIGTTOU, {SIG_IGN}, {SIG_IGN}, 8) = 0 |
---|
| 211 | rt_sigaction(SIGTTIN, {SIG_IGN}, {SIG_IGN}, 8) = 0 |
---|
| 212 | rt_sigaction(SIGWINCH, {0x807dc33, [], SA_RESTORER, 0x6ff7a4f8}, {0x80ca5cd, [], SA_RESTORER|SA_RESTART, 0x6ff7a4f8}, 8) = 0 |
---|
| 213 | rt_sigaction(SIGINT, {0x808f7d7, [], SA_RESTORER, 0x6ff7a4f8}, {0x808f7d7, [], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 214 | rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 |
---|
| 215 | pipe([4, 5]) = 0 |
---|
| 216 | rt_sigprocmask(SIG_BLOCK, [INT CHLD], [CHLD], 8) = 0 |
---|
| 217 | fork() = 19755 |
---|
| 218 | setpgid(19755, 19755) = 0 |
---|
| 219 | rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0 |
---|
| 220 | close(5) = 0 |
---|
| 221 | rt_sigprocmask(SIG_BLOCK, [INT CHLD], [CHLD], 8) = 0 |
---|
| 222 | fork() = 19756 |
---|
| 223 | setpgid(19756, 19755) = 0 |
---|
| 224 | rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0 |
---|
| 225 | close(4) = 0 |
---|
| 226 | rt_sigprocmask(SIG_BLOCK, [CHLD], [CHLD], 8) = 0 |
---|
| 227 | rt_sigprocmask(SIG_BLOCK, [CHLD TSTP TTIN TTOU], [CHLD], 8) = 0 |
---|
| 228 | ioctl(255, TIOCSPGRP, [19755]) = 0 |
---|
| 229 | rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0 |
---|
| 230 | rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0 |
---|
| 231 | rt_sigprocmask(SIG_BLOCK, [CHLD], [CHLD], 8) = 0 |
---|
| 232 | wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WUNTRACED, NULL) = 19755 |
---|
| 233 | wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WUNTRACED, NULL) = 19756 |
---|
| 234 | rt_sigprocmask(SIG_BLOCK, [CHLD TSTP TTIN TTOU], [CHLD], 8) = 0 |
---|
| 235 | ioctl(255, TIOCSPGRP, [19473]) = 0 |
---|
| 236 | rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0 |
---|
| 237 | rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0 |
---|
| 238 | rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 |
---|
| 239 | --- SIGCHLD (Child exited) @ 0 (0) --- |
---|
| 240 | wait4(-1, 0x77fc9c54, WNOHANG|WUNTRACED, NULL) = -1 ECHILD (No child processes) |
---|
| 241 | sigreturn() = ? (mask now []) |
---|
| 242 | rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 |
---|
| 243 | rt_sigaction(SIGINT, {0x808f7d7, [], SA_RESTORER, 0x6ff7a4f8}, {0x808f7d7, [], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 244 | rt_sigprocmask(SIG_BLOCK, [CHLD TSTP TTIN TTOU], [], 8) = 0 |
---|
| 245 | ioctl(255, TIOCSPGRP, [19473]) = 0 |
---|
| 246 | rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 |
---|
| 247 | rt_sigaction(SIGINT, {0x808f7d7, [], SA_RESTORER, 0x6ff7a4f8}, {0x808f7d7, [], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 248 | rt_sigprocmask(SIG_BLOCK, [INT], [], 8) = 0 |
---|
| 249 | rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 |
---|
| 250 | rt_sigaction(SIGINT, {0x80ca530, [], SA_RESTORER, 0x6ff7a4f8}, {0x808f7d7, [], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 251 | rt_sigaction(SIGTERM, {0x80ca530, [], SA_RESTORER, 0x6ff7a4f8}, {SIG_IGN}, 8) = 0 |
---|
| 252 | rt_sigaction(SIGTERM, {SIG_IGN}, {0x80ca530, [], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 253 | rt_sigaction(SIGQUIT, {0x80ca530, [], SA_RESTORER, 0x6ff7a4f8}, {SIG_IGN}, 8) = 0 |
---|
| 254 | rt_sigaction(SIGQUIT, {SIG_IGN}, {0x80ca530, [], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 255 | rt_sigaction(SIGALRM, {0x80ca530, [], SA_RESTORER, 0x6ff7a4f8}, {0x808f752, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 256 | rt_sigaction(SIGTSTP, {0x80ca530, [], SA_RESTORER, 0x6ff7a4f8}, {SIG_IGN}, 8) = 0 |
---|
| 257 | rt_sigaction(SIGTSTP, {SIG_IGN}, {0x80ca530, [], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 258 | rt_sigaction(SIGTTOU, {0x80ca530, [], SA_RESTORER, 0x6ff7a4f8}, {SIG_IGN}, 8) = 0 |
---|
| 259 | rt_sigaction(SIGTTOU, {SIG_IGN}, {0x80ca530, [], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 260 | rt_sigaction(SIGTTIN, {0x80ca530, [], SA_RESTORER, 0x6ff7a4f8}, {SIG_IGN}, 8) = 0 |
---|
| 261 | rt_sigaction(SIGTTIN, {SIG_IGN}, {0x80ca530, [], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 262 | rt_sigaction(SIGWINCH, {0x80ca5cd, [], SA_RESTORER|SA_RESTART, 0x6ff7a4f8}, {0x807dc33, [], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 263 | write(2, "sh-3.00# ", 9) = 9 |
---|
| 264 | |
---|
| 265 | |
---|
| 266 | getpid() = 19755 |
---|
| 267 | rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 |
---|
| 268 | rt_sigaction(SIGTSTP, {SIG_DFL}, {SIG_IGN}, 8) = 0 |
---|
| 269 | rt_sigaction(SIGTTIN, {SIG_DFL}, {SIG_IGN}, 8) = 0 |
---|
| 270 | rt_sigaction(SIGTTOU, {SIG_DFL}, {SIG_IGN}, 8) = 0 |
---|
| 271 | setpgid(19755, 19755) = 0 |
---|
| 272 | rt_sigprocmask(SIG_BLOCK, [CHLD TSTP TTIN TTOU], [], 8) = 0 |
---|
| 273 | ioctl(255, TIOCSPGRP, [19755]) = 0 |
---|
| 274 | rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 |
---|
| 275 | close(4) = 0 |
---|
| 276 | dup2(5, 1) = 1 |
---|
| 277 | close(5) = 0 |
---|
| 278 | rt_sigaction(SIGINT, {SIG_DFL}, {0x808f7d7, [], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 279 | rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_IGN}, 8) = 0 |
---|
| 280 | rt_sigaction(SIGTERM, {SIG_DFL}, {SIG_IGN}, 8) = 0 |
---|
| 281 | rt_sigaction(SIGCHLD, {SIG_DFL}, {0x807c922, [], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 282 | execve("/bin/sleep", ["sleep", "1"], [/* 34 vars */]) = 0 |
---|
| 283 | ... |
---|
| 284 | _exit(0) = ? |
---|
| 285 | |
---|
| 286 | |
---|
| 287 | getpid() = 19756 |
---|
| 288 | rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 |
---|
| 289 | rt_sigaction(SIGTSTP, {SIG_DFL}, {SIG_IGN}, 8) = 0 |
---|
| 290 | rt_sigaction(SIGTTIN, {SIG_DFL}, {SIG_IGN}, 8) = 0 |
---|
| 291 | rt_sigaction(SIGTTOU, {SIG_DFL}, {SIG_IGN}, 8) = 0 |
---|
| 292 | setpgid(19756, 19755) = 0 |
---|
| 293 | rt_sigprocmask(SIG_BLOCK, [CHLD TSTP TTIN TTOU], [], 8) = 0 |
---|
| 294 | ioctl(255, TIOCSPGRP, [19755]) = 0 |
---|
| 295 | rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 |
---|
| 296 | dup2(4, 0) = 0 |
---|
| 297 | close(4) = 0 |
---|
| 298 | rt_sigaction(SIGINT, {SIG_DFL}, {0x808f7d7, [], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 299 | rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_IGN}, 8) = 0 |
---|
| 300 | rt_sigaction(SIGTERM, {SIG_DFL}, {SIG_IGN}, 8) = 0 |
---|
| 301 | rt_sigaction(SIGCHLD, {SIG_DFL}, {0x807c922, [], SA_RESTORER, 0x6ff7a4f8}, 8) = 0 |
---|
| 302 | execve("/bin/sleep", ["sleep", "2"], [/* 34 vars */]) = 0 |
---|
| 303 | ... |
---|
| 304 | _exit(0) = ? |
---|