Make our child the leader of its own process group to avoid receiving
signals in its stead. This fixes the dread "zsh exits upon ^C" bug.
This commit is contained in:
parent
a773b8d895
commit
b668109698
@ -319,6 +319,8 @@ main(int argc, char *argv[])
|
||||
child_pid = fork();
|
||||
switch (child_pid) {
|
||||
default:
|
||||
setpgid(child_pid, child_pid);
|
||||
tcsetpgrp(1, child_pid);
|
||||
while ((ret_pid = waitpid(child_pid, &statusp, WUNTRACED)) != -1) {
|
||||
if (WIFSTOPPED(statusp)) {
|
||||
child_pgrp = tcgetpgrp(1);
|
||||
|
Loading…
Reference in New Issue
Block a user