DragonFly BSD
DragonFly bugs List (threaded) for 2005-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

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

From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 27 Dec 2005 13:53:34 -0800 (PST)

: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)
:   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)  

    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.


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