Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: "Segmentation fault" text not captured by perl script

by dave_the_m (Monsignor)
on Apr 01, 2020 at 18:39 UTC ( [id://11114920]=note: print w/replies, xml ) Need Help??


in reply to "Segmentation fault" text not captured by perl script

The "segmentation fault" text is emitted by the shell which invoked the bad executable, not the executable itself. In your second case, you're not using a shell and invoking the executable directly from perl, so it's up to your perl program to check the return status and display any suitable error message.

Note that if you include metacharacters in your call to system, e.g. system("$cmd > foo") then perl will invoke a shell to invoke the executable, and you'll see the error message generated by the shell.

Dave.

  • Comment on Re: "Segmentation fault" text not captured by perl script

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-18 11:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found