bug-coreutils
[Top][All Lists]
Advanced

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

bug#54681: timeout: Program called by timeout cannot interact with tty s


From: Pádraig Brady
Subject: bug#54681: timeout: Program called by timeout cannot interact with tty stdin when timeout is called by exec()
Date: Sat, 2 Apr 2022 13:25:47 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:97.0) Gecko/20100101 Thunderbird/97.0

tag 54681 notabug
close 54681
stop

On 02/04/2022 11:22, Zhaofeng Yang wrote:
Hi GNU Team,

I found that program called by timeout cannot interact with tty stdin
when timeout is called by exec().

A simplest example is `timeout 10 timeout 5 cat`. cat cannot read input
from tty stdin.

I also tried to run `timeout 5 cat` in other programs by exec(), and
all of them cannot read tty stdin. For example,

import subprocess
subprocess.run(f"timeout 5 cat", shell=True)

timeout has a --foreground option to support this case,
with the caveat that if the program forks children,
they'll not be timed out.

See https://www.gnu.org/software/coreutils/timeout for details.

cheers,
Pádraig






reply via email to

[Prev in Thread] Current Thread [Next in Thread]