Yaerox has asked for the wisdom of the Perl Monks concerning the following question:
Hey guys, it's the first time for me posting on Perlmonks, I really hope I didn't chose the wrong area to do this. If so, please let me know.
Well, I'm actual trying to get www.Gearman.org running and it seems like I have to fork on some point. When I was researching about forking how it works, and how it should be done, I read something about exit_value, signal_num and dump_core. Maybe a little code example here:
You can check all the failure possibilities by inspecting "$?" like this: $exit_value = $? >> 8; $signal_num = $? & 127; $dumped_core = $? & 128;
Best method to capture return code from system calls?
I know what bitwise is and how it works, but I don't get what this three variables should tell me. I mean I know what an exit_value is, but this signal num or dumped_core ... what does it brings to me to bitwise $? (= return value by a fork) with 127 or 128? Regards.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: What means: exit_value , signal_num and dumped_core
by Bloodnok (Vicar) on Apr 11, 2014 at 12:23 UTC | |
by Yaerox (Scribe) on Apr 11, 2014 at 12:44 UTC | |
by Bloodnok (Vicar) on Apr 11, 2014 at 13:02 UTC | |
by Yaerox (Scribe) on Apr 11, 2014 at 13:06 UTC |