mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 14:07:55 +00:00
parallel: exec sleep does not work on CygWin.
This commit is contained in:
parent
dd25255ca8
commit
e06ab693b3
|
@ -1376,7 +1376,7 @@ sub check_invalid_option_combinations {
|
|||
|
||||
sub init_globals {
|
||||
# Defaults:
|
||||
$Global::version = 20170515;
|
||||
$Global::version = 20170522;
|
||||
$Global::progname = 'parallel';
|
||||
$Global::infinity = 2**31;
|
||||
$Global::debug = 0;
|
||||
|
@ -5513,8 +5513,13 @@ sub compute_number_of_processes {
|
|||
# The child takes one process slot
|
||||
# It will be killed later
|
||||
$SIG{'TERM'} = $Global::original_sig{'TERM'};
|
||||
if($^O eq "cygwin") {
|
||||
# The exec does not work on Cygwin
|
||||
sleep 10101010;
|
||||
} else {
|
||||
# 'exec sleep' takes less RAM than sleeping in perl
|
||||
exec 'sleep', 10101;
|
||||
}
|
||||
exit(0);
|
||||
} else {
|
||||
# Failed to spawn
|
||||
|
|
Loading…
Reference in a new issue