bug-bash
[Top][All Lists]
Advanced

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

Re: A background ssh can take over the tty from bash?


From: Chet Ramey
Subject: Re: A background ssh can take over the tty from bash?
Date: Sun, 11 Jun 2017 17:48:37 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.1

On 6/10/17 10:19 AM, Clark Wang wrote:

> If I kill the "ssh -o ControlMaster=no -o ControlPath=/tmp/socket.tmp
> 127.0.0.1 sleep 9999" then tty #1 (pts/11) would be able to accept my input
> again. Seems like the background "ssh" at tty #1 is consuming all input. I
> cannot understand this since it should be stopped by SIGTTIN if it tries to
> read from the tty.

This has come up before. You need to use `ssh -n' to avoid it reading from
stdin. Processes can ignore SIGTTIN, and ssh does so to avoid being stopped
if it reads from the tty while in the background.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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