bug-parallel
[Top][All Lists]
Advanced

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

Re: GNU Parallel Bug Reports Remote commands should terminate immediatel


From: Ole Tange
Subject: Re: GNU Parallel Bug Reports Remote commands should terminate immediately if I terminate parallel with CTRL+C
Date: Thu, 14 Mar 2013 17:13:47 +0100

On Wed, Mar 13, 2013 at 10:39 PM, Ole Tange <address@hidden> wrote:
> On Tue, Mar 12, 2013 at 5:54 PM, Ben Booth <address@hidden> wrote:
> :
>> When using parallel to run remote commands over SSH, I expect that 
>> terminating parallel with CTRL+C should also terminate the commands running 
>> remotely. Instead, they continue to run and I have to log into each machine 
>> and kill the process manually. I think it would be better if parallel 
>> terminated the remote commands when it catches the CTRL+C signal, since I 
>> believe this already occurs for locally run processes.
>
> Unfortunately this is not easy to fix.

But there is a work-around:

    parallel -qS server perl -e 'sleep(100)' ::: 1 2 3

This will not die when CTRL-C'ed. But this will:

    parallel -qS 'ssh -t -t server' perl -e 'sleep(100)' ::: 1 2 3

You will pay a price for that:

  * STDIN to the process is now treated as a terminal. So --pipe will
be quite unpredictable: E.g. ^C (ascii: 3) will send CTRL-C.
  * You get 'Connection to server closed' - unless you use -o LogLevel=quiet
  * On STDOUT "\n" (ascii 10) becomes "\r\n" (ascii 13 10), so binary
output on STDOUT will be messed up.

It will work fine if:

  * --pipe is not used
  * input is normal printable strings (ascii > 32)
  * output is text (beware that \n -> \r\n)


/Ole



reply via email to

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