[Top][All Lists]

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

Re: How to disable SIGTERM

From: Ole Tange
Subject: Re: How to disable SIGTERM
Date: Wed, 8 Apr 2015 23:47:10 +0200

On Tue, Apr 7, 2015 at 6:06 PM, Martin d'Anjou
<address@hidden> wrote:

> GNU Parallel intercepts SIGTERM. The program I call needs to receive
> SIGTERM. How do I disable SIGTERM's interception by GNU Parallel?

SIGTERM signals GNU Parallel to stop spawning more jobs and wait for
running jobs to complete.

If you send SIGTERM twice GNU Parallel will exit immediately.

If this is not what you want, you most likely need to make a wrapper
that saves $$ to you in a file:

    parallel 'echo $$ > {%};sleep {}'  ::: {90000..90009}

If the reason for getting the pid is to kill run-amok processes,
consider looking at --timeout and --memfree. The both send TERM, TERM,
KILL to child processes.


reply via email to

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