Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix blocked signals after fork(2)ing external command in subshell
When the classic fork/exec mechanism was used (via sh_fork()) to run an external command from within a non-forking subshell, SIGINT was blocked until that subshell was exited. If a subsequent loop was run in the subshell, it became uninterruptible, e.g.: $ arch/*/bin/ksh -c '(/usr/bin/true; while :; do :; done); exit' ^C^C^C^C^C src/cmd/ksh93/sh/xec.c: - sh_fork() did not reset the savesig variable in the parent part of the fork when running in a virtual subshell. This had the effect of delaying signal handling until exiting the subshell. There is no reason for that subshell check that I can discern, so this removes it. I've verified that this causes no regression test failures even when ksh is compiled with -DSHOPT_SPAWN=0 which means the classic fork/exec mechanism is always used. Fixes: #86
- Loading branch information