diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/exec.c | 13 |
2 files changed, 16 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 6c77de2c7..be61bd073 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-03-08 Peter Stephenson <p.stephenson@samsung.com> + + * 38114: Src/exec.c: In substitutions involving subshells, disable + signals that require interactive handling. + 2016-03-09 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> * unposted: .gitignore: update for 38108 diff --git a/Src/exec.c b/Src/exec.c index b60fc90bd..50eff72cb 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -994,9 +994,18 @@ entersubsh(int flags) if ((flags & ESUB_REVERTPGRP) && getpid() == mypgrp) release_pgrp(); shout = NULL; - if (!job_control_ok) { + if (flags & ESUB_NOMONITOR) { /* - * If this process is not goign to be doing job control, + * Allowing any form of interactive signalling here is + * actively harmful as we are in a context where there is no + * control over the process. + */ + signal_ignore(SIGTTOU); + signal_ignore(SIGTTIN); + signal_ignore(SIGTSTP); + } else if (!job_control_ok) { + /* + * If this process is not going to be doing job control, * we don't want to do special things with the corresponding * signals. If it is, we need to keep the special behaviour: * see note about attachtty() above. |