mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-25 23:47:53 +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 {
|
sub init_globals {
|
||||||
# Defaults:
|
# Defaults:
|
||||||
$Global::version = 20170515;
|
$Global::version = 20170522;
|
||||||
$Global::progname = 'parallel';
|
$Global::progname = 'parallel';
|
||||||
$Global::infinity = 2**31;
|
$Global::infinity = 2**31;
|
||||||
$Global::debug = 0;
|
$Global::debug = 0;
|
||||||
|
@ -5513,8 +5513,13 @@ sub compute_number_of_processes {
|
||||||
# The child takes one process slot
|
# The child takes one process slot
|
||||||
# It will be killed later
|
# It will be killed later
|
||||||
$SIG{'TERM'} = $Global::original_sig{'TERM'};
|
$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' takes less RAM than sleeping in perl
|
||||||
exec 'sleep', 10101;
|
exec 'sleep', 10101;
|
||||||
|
}
|
||||||
exit(0);
|
exit(0);
|
||||||
} else {
|
} else {
|
||||||
# Failed to spawn
|
# Failed to spawn
|
||||||
|
|
Loading…
Reference in a new issue