File: exec.right

package info (click to toggle)
bash 5.3-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 43,860 kB
  • sloc: ansic: 134,738; sh: 8,866; yacc: 5,966; makefile: 4,697; perl: 4,105; asm: 48; awk: 23; sed: 16
file content (271 lines) | stat: -rw-r--r-- 3,970 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
before exec1.sub: one two three
calling exec1.sub
aa bb cc dd ee
after exec1.sub with args: 0

after exec1.sub without args: 0
after exec1.sub: one two three
./execscript: line 37: notthere: command not found
127
we would do something here with notthere
/tmp/bash: notthere: No such file or directory
127
/bin/sh: /bin/sh: cannot execute binary file
126
./execscript: line 64: /: Is a directory
126
/: /: Is a directory
126
bash: line 1: exec: .: cannot execute: Is a directory
posix-bash: line 1: exec: .: cannot execute: Is a directory
bash: line 1: exec: .: cannot execute: Is a directory
posix-bash: line 1: exec: .: cannot execute: Is a directory
./execscript: line 79: .: /: is a directory
1
126
0
this is bashenv
trap -- 'echo EXIT' EXIT
trap -- '' SIGTERM
trap -- 'echo USR1' SIGUSR1
USR1
./exec3.sub: line 38: /tmp/bash-notthere: No such file or directory
./exec3.sub: ENOENT: after failed exec: 127
./exec3.sub: line 43: exec: bash-notthere: not found
trap -- 'echo EXIT' EXIT
trap -- '' SIGTERM
trap -- 'echo USR1' SIGUSR1
USR1
EXIT
./execscript: line 103: notthere: command not found
127
./execscript: line 105: notthere: command not found
127
./execscript: line 107: notthere: command not found
127
./execscript: line 113: notthere: command not found
127
./execscript: line 115: notthere: command not found
127
./execscript: line 117: notthere: command not found
127
this is sh
this is sh
unset
ok
5
./exec5.sub: line 4: exec: bash-notthere: not found
127
this is ohio-state
0
1
1
0
42
42
0
1
1
0
0
1
0
1
1 hi 1
2 hi 0
!
!
0
1
0
testb
expand_aliases      	on
1
1
1
1
0
0
0
0
/usr/local/bin:/usr/GNU/bin:/usr/bin:/bin:.
cannot find cat in $TMPDIR
cannot find cat with empty $PATH
PATH = /usr/local/bin:/usr/GNU/bin:/usr/bin:/bin:.
cannot find cat in $TMPDIR with hash
cannot find cat with empty $PATH with hash
PATH = /usr/local/bin:/usr/GNU/bin:/usr/bin:/bin:.
trap -- 'echo foo $BASH_SUBSHELL' EXIT
trap -- 'echo USR1 $BASHPID' SIGUSR1
between
trap -- 'echo foo $BASH_SUBSHELL' EXIT
trap -- 'echo USR1 $BASHPID' SIGUSR1
between 2
trap -- 'echo foo $BASH_SUBSHELL' EXIT
trap -- 'echo USR1 $BASHPID' SIGUSR1
in subshell: 1
in subshell pipeline: 1
group pipeline: 1
EXIT-group.1
foo 0
after
exit code: 1
exit code: 1
exit code: 1
exit code: 1
exit code: 1
exit code: 1
a
b
c
A
B
c
d
c
d
e
x1
x1a
x2
x2a
x2b
x3
x3a
x3b
WORKS
done
WORKS
WORKS
a
b
c
d
a
b
c
d
e
A
B
c
d
c
d
e
x
y
z
WORKS
w
x
y
z
=====
WORKS
done
WORKS
a
b
c
d
a
b
c
d
e
A
B
c
d
c
d
e
x
y
z
WORKS
w
x
y
z
Darwin
x
archive
install
s
sub1
sub2
test
68
archive
install
s
sub1
sub2
test
44
archive
install
s
sub1
sub2
test
86
2
78
1 start
2 start
sub3
1 done
42
test invert
reached subshell
reached group
reached async group
reached timed group
reached simple
reached if test
reached if body
reached while test
reached while body
reached until test
reached until body
reached func
reached for
reached arith for
1) a
2) b
3) c
#? reached select
reached case
reached arith
reached cond
reached coproc body
reached pipeline element invert
reached AND-AND body
reached OR-OR body
reached AND-AND group
reached OR-OR group
./exec17.sub: line 26: exec: notthere: not found
after failed exec: 127
./exec17.sub: line 31: exec: notthere: not found
after failed exec with output redirection
./exec17.sub: line 36: exec: notthere: not found
./exec17.sub: line 37: 4: Bad file descriptor
./exec17.sub: line 40: .: Is a directory
after failed redir stdout
after failed redir stderr
./exec17.sub: line 44: exec: notthere: not found
after failed exec with input redirection
./exec17.sub: line 50: exec: notthere: not found
after failed exec: 127
./exec17.sub: line 55: exec: notthere: not found
after failed exec with output redirection
./exec17.sub: line 60: exec: notthere: not found
./exec17.sub: line 61: 4: Bad file descriptor
./exec17.sub: line 64: .: Is a directory
after failed redir stdout
after failed redir stderr
./exec17.sub: line 68: exec: notthere: not found
after failed exec with input redirection