http://qs321.pair.com?node_id=11114920


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