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: Clark Wang
Subject: Re: A background ssh can take over the tty from bash?
Date: Tue, 13 Jun 2017 00:16:33 +0800

On Mon, Jun 12, 2017 at 10:48 PM, Chet Ramey <chet.ramey@case.edu> wrote:

> >
> >     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.
> >
> >
> > I've checked the ssh process and it does not catch SIGTTIN and that's why
> > I'm confused.
>
> OK. This has gone beyond the realm of a bash bug. I'm pretty sure that
> previous versions of ssh ignored or caught SIGTTIN, but it must not do that
> now.
>
> Since ssh has a handle on its controlling terminal, it must do something
> that allows it to read from it even if it's not in the foreground process
> group. In any event, -n is the way to deal with that.
>

Thanks Chet.

I reposted the question to stackoverflow this morning and just managed to
figure out the problem (see https://stackoverflow.com/questions/44492312/ ).

-clark


reply via email to

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