From: Roger Pack Date: 2009-09-02T09:11:29+09:00 Subject: Re: Process#poll Joel VanderWerf wrote: > Roger Pack wrote: >> Question. >> >> Situation: >> I want to start a process, then loop, checking for its status, so that I >> can "know" when it finishes, and not block the Tk.mainloop. >> >> Anybody know how to determine runningness of a process in ruby? >> Thanks! > > Don't the Process.wait family of methods do what you want? Maybe: > > Process.waitpid(pid, Process::WNOHANG) Interesting. I think that that's what Python's Process#poll uses internally. Unfortunately it appears that both it and Process::WNOHANG and Linux only (I'm on doze). Hmm. -r -- Posted via http://www.ruby-forum.com/.