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:
des 2002-05-29 03:32:17 +00:00
parent a773b8d895
commit b668109698

View File

@ -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);