From: Nobuyoshi Nakada Date: 2007-04-22T09:05:58+09:00 Subject: Re: Segfaults, other signals, fork, etc. Hi, At Sun, 22 Apr 2007 01:03:51 +0900, Elliott Hird wrote in [ruby-talk:248642]: > I have this code: > > Process.waitpid(fork { exec "stuff" }) > > Outside of the fork, how can i detect various signals sent to stuff? > SIGSEV, etc. You can detect how the child process exited with $?, or waitpid2. $ ruby -e 'pid = fork {exec "sleep 10"}; sleep 0.1; Process.kill("TERM", pid); p Process.waitpid2(pid)' [23366, #] -- Nobu Nakada