in reply to Parallel::ForkManager run_on_finish Canot get Exit Code of Child process

Your child doesn't pass an exit code to finish or call exit to set its exit code to anything but zero.

Replies are listed 'Best First'.
Re^2: Parallel::ForkManager run_on_finish Canot get Exit Code of Child process
by anshumangoyal (Scribe) on Dec 02, 2011 at 09:23 UTC
    No Success. I added exit() in my child process, but nothing was returned by run_on_exit as exit code. Please check that.

      I don't believe that run_on_exit didn't provide the exit code. Maybe you meant it was zero?

      If the exit code is zero, then you're still not setting it to something other than zero. It's hard to tell what you're doing wrong if you don't show me what you did. What value did you pass to exit?

        This is what I did:
        sub RunChild { if (defined $proxy) { $ENV{http_proxy}="$proxy"; } $logFile = $logDir."/header_".$call; `curl -o /dev/null -m 222 \"$Link\" 2>> $logFile`; my $curlResult = `echo $?`; chomp($curlResult); if ($curlResult != 0) { exit($curlResult); } }
        Then how to get it. Please elaborate? I am badly stuck in this.