[Win32utils-devel] Fwd: win32-process gem: waiting for process

Heesob Park phasis at gmail.com
Wed Sep 25 01:56:24 UTC 2013


2013/9/25 Daniel Berger <djberg96 at gmail.com>:
> Thanks.
> Could he use sleep 0.1 while Process.get_exitcode(info.process_id) ?
> I'm also wondering in general if the builtin Process.spawn + Process.wait
> works. I haven't tried it.

He could use sleep 0.1 while !Process.get_exitcode(info.process_id)

The built-in Process.wait works
Process.wait(Process.spawn('ruby -e "sleep 5;exit(3)"'))
p $?.exitstatus

Park Heesob

More information about the win32utils-devel mailing list