Avoiding SIGCHLD Error In Bash Script That Uses Parallel GNU

I run script.sh in a loop. The script contains a parallel wget command. I get the following error:

Signal SIGCHLD received, but no signal handler set.

The loop is as follows:

for i in {1..5}; do /script.sh; done

And the line causing the error looks like this (without parameters and settings):

cat file.txt | parallel -j15 wget

Study:

I am not an expert at GNU Parallel, but the script seems to work fine for most of the time, except when I get the error above. By raising SIGCHLD, I learned that a working parallel can create β€œzombie processes,” and sometimes we need to β€œreap” these processes. In addition, I found that you can kill processes, because sometimes they can accept all available connections.

Trying to understand:

, . ? "" ? ? , script ?

:

SIGCHLD?

- , .

+4
2

, . , sigchld, -, . perl , , , . - "INGORE". 20150222, , .

+1

( , ).

. , MCVE https://stackoverflow.com/help/mcve. IGNORE , , 4361 parallel :

    delete $SIG{CHLD};

    $SIG{CHLD} = 'IGNORE';

, , , .

0

Source: https://habr.com/ru/post/1656127/


All Articles