linux - Get Ruby to identify if child process get a segfault -


i running ruby wrapper eda tool, in rh5.
the tool segfaulted. however, command line did not show indication. when running command ruby launched, did learn segfault happened. how can segfault message within wrapper? thanks.

from kernel#system documentation:

system returns true if command gives 0 exit status, false non 0 exit status. returns nil if command execution fails. error status available in $?.

so, if want make sure went ok, check if return value of system true. if want check if there segmentation fault, return value false , $: this:

puts $? #=> pid 3658 sigsegv (signal 11) 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -