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

Daniel Berger djberg96 at gmail.com
Tue Sep 24 03:57:18 UTC 2013


---------- Forwarded message ----------
From: Praful (gmail) <praful007 at gmail.com>
Date: Mon, Sep 23, 2013 at 1:39 PM
Subject: win32-process gem: waiting for process
To: djberg96 at gmail.com


Hi ****

** **

I was trying your win32-process gem. Sorry for the silly question but how
do I wait for a created process to terminate after creating it? For
example, if I have****

** **

                info = Process.Create(…)****

                WaitForSingleObject(info.process_handle, 9999)****

                # do some work****

** **

This does not work!****

** **

I'm calling a function (that wraps Process.create) several times and am
finding the output garbled ie intermingled. I added a sleep after the call
and this worked but would rather wait for the created process to terminate.*
***

** **

Also, is there a way of getting the exit code of the app being executed by
CreateProcess?****

** **

Thanks****

** **

Praful****

** **
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/win32utils-devel/attachments/20130923/c344a537/attachment.html>


More information about the win32utils-devel mailing list