mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-26 07:57:58 +00:00
parallel: Fixed bug #49970: Python child process dies if --env is used
This commit is contained in:
parent
1407c1c947
commit
9f7eaa5f93
13
src/parallel
13
src/parallel
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env perl
|
#!/usr/bin/env perl
|
||||||
|
|
||||||
# Copyright (C) 2007,2008,2009,2010,2011,2012,2013,2014,2015,2016
|
# Copyright (C) 2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017
|
||||||
# Ole Tange and Free Software Foundation, Inc.
|
# Ole Tange and Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -1259,7 +1259,7 @@ sub check_invalid_option_combinations {
|
||||||
|
|
||||||
sub init_globals {
|
sub init_globals {
|
||||||
# Defaults:
|
# Defaults:
|
||||||
$Global::version = 20161223;
|
$Global::version = 20170101;
|
||||||
$Global::progname = 'parallel';
|
$Global::progname = 'parallel';
|
||||||
$Global::infinity = 2**31;
|
$Global::infinity = 2**31;
|
||||||
$Global::debug = 0;
|
$Global::debug = 0;
|
||||||
|
@ -3887,7 +3887,7 @@ sub version {
|
||||||
# Returns: N/A
|
# Returns: N/A
|
||||||
print join("\n",
|
print join("\n",
|
||||||
"GNU $Global::progname $Global::version",
|
"GNU $Global::progname $Global::version",
|
||||||
"Copyright (C) 2007,2008,2009,2010,2011,2012,2013,2014,2015,2016",
|
"Copyright (C) 2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017",
|
||||||
"Ole Tange and Free Software Foundation, Inc.",
|
"Ole Tange and Free Software Foundation, Inc.",
|
||||||
"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>",
|
"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>",
|
||||||
"This is free software: you are free to change and redistribute it.",
|
"This is free software: you are free to change and redistribute it.",
|
||||||
|
@ -7246,10 +7246,10 @@ sub base64_zip_eval {
|
||||||
# Returns:
|
# Returns:
|
||||||
# $script = 1-liner for perl -e
|
# $script = 1-liner for perl -e
|
||||||
my $script = ::spacefree(0,q{
|
my $script = ::spacefree(0,q{
|
||||||
@GNU_Parallel=split /_/,"use_IPC::Open3;_use_MIME::Base64";
|
@GNU_Parallel = split /_/, "use_IPC::Open3;_use_MIME::Base64";
|
||||||
eval"@GNU_Parallel";
|
eval"@GNU_Parallel";
|
||||||
|
$chld = $SIG{CHLD};
|
||||||
$SIG{CHLD}="IGNORE";
|
$SIG{CHLD} = "IGNORE";
|
||||||
# Search for bzip2. Not found => use default path
|
# Search for bzip2. Not found => use default path
|
||||||
my $zip = (grep { -x $_ } "/usr/local/bin/bzip2")[0] || "bzip2";
|
my $zip = (grep { -x $_ } "/usr/local/bin/bzip2")[0] || "bzip2";
|
||||||
# $in = stdin on $zip, $out = stdout from $zip
|
# $in = stdin on $zip, $out = stdout from $zip
|
||||||
|
@ -7268,6 +7268,7 @@ sub base64_zip_eval {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
wait;
|
wait;
|
||||||
|
$SIG{CHLD} = $chld;
|
||||||
eval $eval;
|
eval $eval;
|
||||||
});
|
});
|
||||||
::debug("base64",$script,"\n");
|
::debug("base64",$script,"\n");
|
||||||
|
|
Loading…
Reference in a new issue