Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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.


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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2020-10-31 05:24 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (286 votes). Check out past polls.