Don't skip forking for an external command if any traps are active.
Example: sh -c '(trap "echo trapped" EXIT; sleep 3)' now correctly prints "trapped". With this check, it is no longer necessary to check for -T explicitly in that case. This is a useful bugfix by itself and also important because I plan to skip forking more often. PR: bin/113860 (part of) PR: bin/74404 (part of) Reviewed by: stefanf Approved by: ed (mentor)
This commit is contained in:
@@ -39,6 +39,7 @@ extern volatile sig_atomic_t gotwinch;
|
||||
|
||||
int trapcmd(int, char **);
|
||||
void clear_traps(void);
|
||||
int have_traps(void);
|
||||
void setsignal(int);
|
||||
void ignoresig(int);
|
||||
void onsig(int);
|
||||
|
||||
Reference in New Issue
Block a user