in reply to Re: Help checking program return values
in thread Help checking program return values
> 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?