Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: fg/bg on FreeBSD.



On May 7,  4:58am, Tanaka Akira wrote:
} Subject: Re: fg/bg on FreeBSD.
}
} In article <hvozoq3mux1.fsf@xxxxxxxxxxxxxxx>,
}   Tanaka Akira <akr@xxxxxxxx> writes:
} 
} > Possibly.  But NetBSD has no problem...
} 
} I found the difference between FreeBSD and NetBSD.
} 
} FreeBSD fails to kill(-PGID,0) for zombie process but NetBSD (and
} Linux) succeeds.
} 
[...]
} 
} I confirmed following modification prevents the problem.  But
} definitely this is too radical...
} 
} Index: Src/exec.c
} ===================================================================
} -           if (killpg(jobtab[list_pipe_job].gleader, 0) == -1 ||
} +           if (/* killpg(jobtab[list_pipe_job].gleader, 0) == -1 || */
}                 setpgrp(0L, jobtab[list_pipe_job].gleader) == -1) {

What happens if you reverse the order of the test?

          if (setpgrp(0L, jobtab[list_pipe_job].gleader) == -1 ||
	      killpg(jobtab[list_pipe_job].gleader, 0) == -1) {

What I'm trying to discover is whether killpg() continues to fail after
a process is successfully added to the group.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



Messages sorted by: Reverse Date, Date, Thread, Author