exit-ing in a trap handler uses the wrong exit code
Bug #647450 reported by
Loïc Minier
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dash |
New
|
Undecided
|
|||
dash (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: dash
Hi
dash -c 'trap "sh -c \"exit 4\"; exit" 0 1 2 3 9 11 13 15;exit 3'; echo $?
4
according to POSIX this should be 3:
http://
bash gets this right:
bash -c 'trap "sh -c \"exit 4\"; exit" 0 1 2 3 9 11 13 15;exit 3'; echo $?
3
Cheers,
To post a comment you must log in.