parallel
[Top][All Lists]
Advanced

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

Re: How does the --halt 2 option kill off all jobs?


From: Martin d'Anjou
Subject: Re: How does the --halt 2 option kill off all jobs?
Date: Tue, 21 Apr 2015 09:30:16 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 15-04-20 06:53 PM, Ole Tange wrote:
On Fri, Apr 17, 2015 at 8:06 PM, Martin d'Anjou
<martin.danjou14@gmail.com> wrote:
Hi,

The --halt 2 documentation says:
"Kill off all jobs immediately and exit without clean up."

When I look in the source, I see in Job::should_we_halt() a call to the exit
statement:

exit($job->exitstatus())

but I do not see a call that kills all the jobs.

I am confused. Does the exit() statement kill all the jobs? What code kills
off all jobs when --halt 2 is specified?
You are right: GNU Parallel just exits. It should kill the children first.

Implemented in git version.

/Ole

Thank you Ole!

I should say that I am very happy about all the recent changes you have made (I just looked at the git repo), not just for the halt feature but for the ones I have been writing about on this list.

I have been attempting to do them myself but it is hard for me to determine the best way, plus I was unable to determine if the "old" behaviour should be preserved for backward compatibility. I see that you are moving forward, which is simpler and easier.

Yesterday I wanted to unroll the kill loop in Job::kill(), but I was not sure. Now I see that you have done just that in killall().

If there is anything I can do to help, let me know.

I will start using the git HEAD for a few experiments, and I will wait for your next release before pushing to production.

Thank you again.

Martin



reply via email to

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