Re: Bug#1003095: /usr/bin/script: hangs when child doesn't read input fast enough

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

 



Hi!

Bumping this patch after 2ish weeks :)

Best,

On Fri, Jan 14, 2022 at 12:28:12AM +0100, наб wrote:
> Subject: Put master PTY into non-blocking mode and buffer its output
>  to avoid deadlock
> 
> If we filled the script->child buffer before the child had a chance
> to read any input, we'd sleep forever in write_all(pty->master),
> and the child would sleep forever in write(1<pty->slave>)
> 
> By putting the master PTY in non-blocking mode, we can
> poll(pty->master, POLLOUT) and keep supplying more data
> as the child reads from the buffer
> 
> Fixes Debian bug #1003095

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux