waitpid() with WUNTRACED flag? (was Re: Hang on ctrl+Z after the MPSAFE tsleep/wakeup commit)

Matthew Dillon dillon at apollo.backplane.com
Tue Dec 27 13:56:37 PST 2005


:the same time.  So in the common case I think the parent shouldn't=20
:notice either, but I know that it's not possible in the way we process=20=
:
:suspend signals now.  Except, of course, if we add another sleep point=20=
:
:*in* wait.  Or am I talking nonsense?  (Few sleep at the moment)
:
:cheers
:   simon

    That is precisely what we would have to do, as I indicated earlier
    (I worded it differently but it amounts to the same thing).  We would
    have to put a P_STOPPED check in the kernel wait*() code.

    Note that even on FreeBSD the SIGCONT is still picked up.  It's in fact
    the reason why the SIGSTOP is NOT picked up by the parent, because
    the SIGCONT overwrites the SIGSTOP in the chlid's proc.

    Making wait*() work like it did before is a two-line fix.  Basically just
    this after the loop: label in kern_wait():

	while (q->p_flag & P_STOPPED)  
	    tstop(q);

    But I don't know if I want to actually do that.  I think the original
    userland code is what was broken, not the kernel.

						-Matt






More information about the Bugs mailing list