[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: another 1.10 job control bug?



"Nicholas S Castellano" <entropy@terminator.rs.itd.umich.edu> writes:

|>> i think the problem was when there are several processes in a group the
|>> leader isn't always the one that exits last, and then you could no longer
|>> signal the others from the terminal after that. (^c, ^z, ...)  of course
|>> you could say the parent should always catch SIGCHLD and then TIOCSPGRP
|>> whenever the first process in a pipe (for example) exited but somehow i
|>> doubt thats a real solution...  (although i did put such a hack in ksh
|>> first... :)

|> That is exactly the problem, but I'm not sure I like the proposed
|> solution.

I'm using this solution for quite a long time now, without any
problems.

|> Is there any situation where a process group leader exits and you
|> still want processes in that group to be allowed to access the tty?

Bash sets up a pipeline by making the first process the group leader.
So if you pipe the output of a process into less, for example, this
process will almost always exit before less. I think there is no
better solution except adding sessions to MiNT. And bash is supposed to
be POSIX complient.

----------------------------------------------------------------------
Andreas Schwab                                  "And now for something
schwab@ls5.informatik.uni-dortmund.de            completely different"