Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Help checking program return values

by Special_K (Monk)
on Jul 29, 2020 at 18:44 UTC ( [id://11120007]=note: print w/replies, xml ) Need Help??


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?
  • Comment on Re^2: Help checking program return values

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11120007]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-24 14:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found