Control: tags -1 + fixed-upstream
Control: forwarded -1 
http://source.myrepos.branchable.com/?p=source.git;a=commitdiff;h=0d8dc60c227cf5868e568c7fa30ebec1f770d521

On Mon, 2019-10-14 at 16:09 +0300, Niko Tyni wrote:

> Maybe you didn't have libio-pty-easy-perl installed on the stretch system
> as that would silently mask the issue?

Untested, but that could definitely explain it.

> As far as I can see, the problem here is that the 
>   while (my $data = $pty->read()) { ... }
> loop assumes EOF when $data is false, and doesn't check for undef. 
> The IO::Pty::Easy docs say for read():
> 
>        Returns "undef" on timeout, the empty string on EOF, or a string
>        of at least one character on success (this is consistent with
>        "sysread()" and Term::ReadKey).

I guess that since I didn't set a timeout I assumed the read call would
only return either EOF or data not undef.

> When SIGWINCH interrupts the blocking read(), mr proceeds to close the pty,
> and the child processes die from SIGHUP.

Any idea why something similar doesn't also happen in the loop above,
where getline would return undef on error, terminating the loop?

> Maybe something like the attached patch would do?

That works for me, updated commit message trailer, applied upstream.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to