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

YONETANI Tomokazu qhwt+dfly at les.ath.cx
Mon Dec 26 16:19:31 PST 2005


On Mon, Dec 26, 2005 at 11:16:10AM -0800, Matthew Dillon wrote:
> 
> :While this has been fixed, I realized that I overlooked another
> :similar problem; try running vipw, suspend it with ctrl-Z and
> :continue with `fg'; the shell immediately reports that vipw has been
> :suspended(processes are marked as `TL' by ps command); another `fg'
> :seems to continue it, but vi(or whatever editor invoked by vipw)
> :doesn't handle the screen properly, even though it's responding to
> :the keystrokes.
> :Attached is a small code fragment that demonstrates the problem.
> :BTW, it behaves differently on -CURRENT and 1.2.6-RELEASE;
> :on -CURRENT, waitpid() returns after `fg' command followed by a ctrl-Z,
> :while on 1.2.6-RELEASE it never returns when suspended or continued.
> :Without WUNTRACED flag, the code seems to work the same way on both
> :versions of the OS.
> :Too bad I couldn't find it before the new release.
> 
>     We haven't released yet!  I can reproduce the same problem so I'll
>     track it down and get it fixed before the release.

Oops, I was supposed to say `before branching.'  Anyway, I'll play with
signal a bit more but hopefully this is the last one.
By the way, here's the code I forgot attaching in the previous message.
It behaves consistently on Linux, FreeBSD, and NetBSD boxes around me,
but differently on the recent DragonFly.





More information about the Bugs mailing list