GNU bug report logs - #54681
timeout: Program called by timeout cannot interact with tty stdin when timeout is called by exec()

Previous Next

Package: coreutils;

Reported by: Zhaofeng Yang <yangzhaofeng <at> arcas-da.com>

Date: Sat, 2 Apr 2022 11:24:01 UTC

Severity: normal

Tags: notabug

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #13 received at control <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Zhaofeng Yang <yangzhaofeng <at> arcas-da.com>, 54681 <at> debbugs.gnu.org
Subject: Re: 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
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





This bug report was last modified 3 years and 109 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.