Timeline for exit shell script from a subshell
Current License: CC BY-SA 3.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 9, 2016 at 14:38 | comment | added | ceving | How to know, when not being in a sub-shell trap, in order to return 1 instead of 77? | |
| Apr 6, 2016 at 18:44 | comment | added | Olivier Dulac | Interresting! Is there any luck on (quite older) bash that doesn't have -E ? maybe we have to resort to defining a trap on a USER signal and using a kill to that signal? I'll do some reasearch too... | |
| Mar 30, 2016 at 14:58 | comment | added | Warbo | One thing to watch out for, this trap won't handle interpolated commands, e.g. echo "$(exit 77)"; the script will carry on as if we'd written echo "" | |
| Aug 21, 2015 at 14:31 | history | edited | Stéphane Chazelas | CC BY-SA 3.0 | added 88 characters in body |
| Sep 19, 2012 at 10:16 | history | edited | Stéphane Chazelas | CC BY-SA 3.0 | more information to better describe the solution |
| Sep 19, 2012 at 9:23 | comment | added | user13742 | Interesting solution! Clearly more elegant than kill $$. | |
| Sep 18, 2012 at 21:19 | history | answered | Stéphane Chazelas | CC BY-SA 3.0 |