P is for Practical | |
PerlMonks |
Re^2: Help checking program return valuesby Special_K (Monk) |
on Jul 29, 2020 at 18:44 UTC ( [id://11120007]=note: print w/replies, xml ) | Need Help?? |
> You haven't said which O/S you are running on and that might well have an impact here.
Linux (I've updated my post to say this). > That isn't Perl, so either the code you are showing isn't the code you are running or your code isn't running at all. Correct, it should have said "elsif" as I manually typed that out into the web submission form. This has also been corrected. > An exit code of 139 does not necessarily indicate a seg fault. Trivially: Correct, I could make an executable return any code I want it to under any circumstances, but assuming I'm only using the return codes 0 and 255 inside the executable to indicate correct and incorrect return values respectively, what is the most reliable way to detect a segmentation fault (or other undesirable return values) that were initiated by the OS?
In Section
Seekers of Perl Wisdom
|
|