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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -