help-bash
[Top][All Lists]
Advanced

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

Re: why are pipeline commands (allowed to be) executed in subshells?


From: Philippe Cerfon
Subject: Re: why are pipeline commands (allowed to be) executed in subshells?
Date: Tue, 13 Dec 2022 23:42:36 +0100

On Tue, Dec 13, 2022 at 10:15 PM Chet Ramey <chet.ramey@case.edu> wrote:
> > Similar via SSH, you can make the above script into one line and set
> > it as RemoteCommand="..." and also need to set RequestTTY=force .
> > When I Ctrl-C, it always stops immediately (the sleep process sees a
> > INT and the bash process, too).
> > When I send INT to the local ssh client, the same.
>
> This implies that telling ssh to allocate a terminal at the remote end
> means the terminal driver gets in the mix to interpret ^C there, and that
> ssh converts the SIGINT you send on the local end to the equivalent of a
> keyboard-generated ^C at the remote end.

Yes, it seems like that... and as far as I can tell, it's ssh one the
remote side, which does the magic, not somehow the local terminal
"directly" affecting the remote TTY, cause it seems that the ssh
processes on the remote side do not see the INT,... only the remote
side bash and children thereof do.

Also, it is apparently a difference if one Ctrl+C or sends INT (sic!)
to the local ssh. In the latter case its remote processes quit and it
just sends a HUP to bash, so it again waits until the sleep is over.


Thanks as well :-)
Philippe



reply via email to

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