X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXCommandmode.pm;fp=perl%2FDXCommandmode.pm;h=bcf1bf075b9beda9f40279bb70b59fbcf4f5e008;hb=c83b1ca22765fc07e5adcdc8dac24cbd066c9b95;hp=ce3c2d1f285202291e3fd8667fadcff62817b05f;hpb=cc9bd946788545ef87a7a6d0541fa1c47b9b034a;p=spider.git diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index ce3c2d1f..bcf1bf07 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -1339,7 +1339,12 @@ sub spawn_cmd $s .= ", args: " . join(', ', map { defined $_ ? qq{'$_'} : q{'undef'} } @$args) if $args && @$args; dbg($s); } - eval { @out = $cmdref->(@$args); }; + eval { + ++$self->{_in_sub_process}; + dbg "\$self->{_in_sub_process} = $self->{_in_sub_process}"; + @out = $cmdref->(@$args); + --$self->{_in_sub_process} if $self->{_in_sub_process} > 0; + }; if ($@) { DXDebug::dbgprintring(25); push @out, DXDebug::shortmess($@);