aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-04-19 20:08:19 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-04-19 20:08:19 +0000
commitd1801a44301ae10910763de860614b1aed9922d7 (patch)
tree1ff6d98e68b57bb1539321b992fb389652c3f98b /shell
parent9ace613406968c1f64b08f6869e51c321557f106 (diff)
downloadbusybox-w32-d1801a44301ae10910763de860614b1aed9922d7.tar.gz
busybox-w32-d1801a44301ae10910763de860614b1aed9922d7.tar.bz2
busybox-w32-d1801a44301ae10910763de860614b1aed9922d7.zip
dd: fix skip= parse error (spotted by Dirk Clemens <develop@cle-mens.de>)
Diffstat (limited to 'shell')
-rw-r--r--shell/README.job70
1 files changed, 68 insertions, 2 deletions
diff --git a/shell/README.job b/shell/README.job
index b29d31588..7e262b489 100644
--- a/shell/README.job
+++ b/shell/README.job
@@ -2,8 +2,12 @@ strace of "sleep 1 | sleep 2" being run from interactive bash 3.0
2 2
3 3
4Synopsis: 4Synopsis:
5open /dev/tty [, if fails, open ttyname(0)]; close /* helps re-establish ctty */
5get current signal mask 6get current signal mask
6install default handlers for GHLD QUIT TERM 7TCGETS on fd# 0
8TCGETS 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 */
10install default handlers for CHLD QUIT TERM
7install common handler for HUP INT ILL TRAP ABRT FPE BUS SEGV SYS PIPE ALRM TERM XCPU XFSZ VTALRM USR1 USR2 11install common handler for HUP INT ILL TRAP ABRT FPE BUS SEGV SYS PIPE ALRM TERM XCPU XFSZ VTALRM USR1 USR2
8ignore QUIT 12ignore QUIT
9install handler for INT 13install handler for INT
@@ -34,11 +38,73 @@ get our pprocess group
34 signal followed by a SIGCONT signal will be sent to each process 38 signal followed by a SIGCONT signal will be sent to each process
35 in the newly-orphaned process group. 39 in the newly-orphaned process group.
36... 40...
37 41dup stderr to fd# 255
42move ourself to our own process group
43block CHLD TSTP TTIN TTOU
44set tty's (255, stderr's) foreground process group to our group
45allow all signals
46mark 255 CLOEXEC
47set CHLD handler
48get signal mask
49get fd#0 flags
50get signal mask
51set INT handler
52block CHLD TSTP TTIN TTOU
53set fd #255 foreground process group to our group
54allow all signals
55set INT handler
56block all signals
57allow all signals
58block INT
59allow all signals
60lotsa sigactions: set INT,ALRM,WINCH handlers, ignore TERM,QUIT,TSTP,TTOU,TTIN
61block all signals
62allow all signals
63block all signals
64allow all signals
65block all signals
66allow all signals
67read "sleep 1 | sleep 2\n"
68block INT
69TCSETSW on fd# 0
70allow all signals
71lotsa sigactions: set INT,ALRM,WINCH handlers, ignore TERM,QUIT,TSTP,TTOU,TTIN
72block CHLD
73pipe([4, 5]) /* oops seems I lost another pipe() in editing... */
74fork child #1
75put child in it's own process group
76block only CHLD
77close(5)
78block only INT CHLD
79fork child #2
80put child in the same process group as first one
81block only CHLD
82close(4)
83block only CHLD
84block only CHLD TSTP TTIN TTOU
85set fd# 255 foreground process group to first child's one
86block only CHLD
87block only CHLD
88block only CHLD
89wait4 for children to die or stop - first child exits
90wait4 for children to die or stop - second child exits
91block CHLD TSTP TTIN TTOU
92set fd# 255 foreground process group to our own one
93block only CHLD
94block only CHLD
95block nothing
96--- SIGCHLD (Child exited) @ 0 (0) ---
97 wait for it - no child (already waited for)
98 sigreturn()
99read signal mask
100lotsa sigactions...
101read next command
38 102
39 103
40execve("/bin/sh", ["sh"], [/* 34 vars */]) = 0 104execve("/bin/sh", ["sh"], [/* 34 vars */]) = 0
41rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 105rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
106ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
107ioctl(2, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
42rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0 108rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0
43rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_DFL}, 8) = 0 109rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_DFL}, 8) = 0
44rt_sigaction(SIGTERM, {SIG_DFL}, {SIG_DFL}, 8) = 0 110rt_sigaction(SIGTERM, {SIG_DFL}, {SIG_DFL}, 8) = 0