From: Claudio Jeker Date: 2006-03-21T01:20:36+09:00 Subject: IO#popen and exit status I'm a bit stuck with this porblem: I need to write data to a process and then wait for the exit code of it to see if it was successful or not. Now I can IO.popen the process but there is no pclose instance method to get the exitcode back. Additionally my workaround via Process.waitpid2 does not work either. I think io.close does already all the cleanup. e.g. io = IO.popen(cmd, "w") io.write(msg) io.close pid, status = Process.waitpid2(0) Raises a "Errno::ECHILD: No child processes" exception. How do other handle this situation? Do I need to take the hard road via pipe, fork, exec or did I miss something obvious? -- :wq Claudio