parallel
[Top][All Lists]
Advanced

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

Re: [External] Changing TERM TERM to HUP TERM


From: Saladi, Shyam M.
Subject: Re: [External] Changing TERM TERM to HUP TERM
Date: Mon, 11 Mar 2019 13:13:03 +0000

I think Gary makes an interesting point. I think the danger of using HUP is that many already use this keycombo (control + D) for closing out of a terminal session. Some ideas: INT followed by QUIT (control + \) or INT followed by STOP (control + S)?

For reference, these are the current keybindings on my macos machine:

(base) ➜  ~ stty -a
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;
min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T;
stop = ^S; susp = ^Z; time = 0; werase = ^W;

and redhat machine:
➜  ~ stty -a
speed 38400 baud; rows 25; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?;
swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;


Shyam


On Mon, Mar 11, 2019 at 1:44 PM Rech, Andrew <address@hidden> wrote:
Ole, I agree this change would be ideal, inasmuch as any TERM should kill the program. But the cost of this breaking change is potentially high in scripts running long jobs, and the upshot small - sending two TERM signals is not difficult, and the message after the first is clear.

A big advantage, in my opinion, of GNU Parallel is that it is simple to use and just works. Echoing Shyam, if you do this, perhaps consider deprecating the current behavior first in addition to an announcement.

Andrew

> On Mar 11, 2019, at 01:33, Gary Johnson <address@hidden> wrote:
>
> On 2019-03-10, Ole Tange wrote:
>> To stop GNU Parallel today you need to send TERM to make it stop
>> starting new jobs followed by another TERM to kill the running jobs.
>>
>> I am considering changing that to send HUP to stop starting new jobs
>> and TERM to kill running jobs.
>>
>> This will make it easier to kill GNU Parallel:
>>
>> $ bash -c 'parallel -j1 sleep ::: 111 222' &
>> # This would then kill the process group with bash and parallel
>> $ kill -TERM -$!
>>
>> It will make it incompatible with previous versions.
>>
>> What is your opinion?
>
> A change seems OK, but using HUP for this purpose doesn't seem like
> a good idea.  Its meaning is specified in the signal(7) man page and
> that doesn't seem to match your proposed usage.  How about using
> USR1 or USR2 instead?
>
> Regards,
> Gary
>
>



reply via email to

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