'Inside a conda enviroment, GNU parallel jobs stop starting new jobs when I close the terminal

It is inside Conda environment (prokka, so actually, I am using the parallel version which is a prokka dependency)

My code is written in a file named test.sh, then I

nohup parallel -k -j 10 < test.sh >test.log &

while inside the test.sh, it is:

echo file1; sleep 50
echo file2; sleep 50
echo file3; sleep 50
...
echo file99; sleep 50

When I closed the terminal, it said parallel will not start new jobs:

$ cat test.log
parallel: SIGHUP received. No new jobs will be started.
parallel: Waiting for these 10 jobs to finish. Send SIGTERM to stop now.
parallel: echo file1; sleep 50
parallel: echo file2; sleep 50
parallel: echo file3; sleep 50
parallel: echo file4; sleep 50
parallel: echo file5; sleep 50
parallel: echo file6; sleep 50
parallel: echo file7; sleep 50
parallel: echo file8; sleep 50
parallel: echo file9; sleep 50
parallel: echo file10; sleep 50
file1
file2
file3
file4
file5
file6
file7
file8
file9
file10

Is the code wrong? Can't find a explanation from the internet. The parallel version I am using is 20201122.

Follow-up: Dealt when I just exit and in the base environment of conda.



Solution 1:[1]

Is it because "SIGTERM is changed to SIGHUP, so sending SIGHUP will make GNU Parallel start no more jobs, but wait for running jobs to finish." ?

If you log out, then the SIGHUP signal will send to parallel. It will not start more jobs.

https://savannah.gnu.org/forum/forum.php?forum_id=9401

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Guandong Shang