truss(1) locked in kernel with 8.0-BETA2

Ed Schouten ed at 80386.nl
Sat Aug 22 19:40:10 UTC 2009


Hi Jeremie,

* Jeremie Le Hen <jeremie at le-hen.org> wrote:
> I've upgraded my laptop to 8.0-BETA2 and ran portupgrade in script(1).
> But according to top, it seems script(1) is going crazy, even after I've
> hit ^C:

The fact that script(1) is going crazy, is a known issue. I have been
pointed to this issue earlier, but unfortunately I don't know what to
do. A certain Colin introduced this bug about 6 years ago. ;-)

It's basically a shortcoming of pseudo-terminals in general. script(1)
wants to behave in a way which cannot be implemented using
pseudo-terminals; when it receives a hangup on its standard input (on
the outside), it wants to propagate the end-of-file condition and wants
to continue until the child processes are finished, instead of shutting
down immediately. So a couple of milliseconds later on, it calls
select(2) again, but because the TTY it uses on the outside is still in
a hangup condition, select(2) returns immediately.

This can easily be reproduced as follows:

	script < /dev/null

I think the only way we can sanely fix this, is by adding a special flag
to instruct script(1) to keep going on, even if stdin disappears. I
wrote a patch for this back in May:

	http://80386.nl/pub/script.diff

Thanks for reminding me. I should contact re@ about this.

-- 
 Ed Schouten <ed at 80386.nl>
 WWW: http://80386.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20090822/6151a1de/attachment.pgp


More information about the freebsd-current mailing list