FTR: I've also reported this bug against FreeBSD, which uses a similar model but with select(2): https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260938 The proposed patch consists of requesting O_NONBLOCK on the master pty and stashing the input received from the child into a buffer, pending such a time that the write won't block: https://reviews.freebsd.org/D33789 This seems much easier to apply to the current single-process util-linux model (which is to say: I've tried to cleave the current implementation into two processes and failed miserably). наб
Attachment:
signature.asc
Description: PGP signature