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 ( #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
Node Status?
node history
Node Type: note [id://11114920]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2020-06-01 17:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (5 votes). Check out past polls.

    Notices?