[Win32utils-devel] [ win32utils-Bugs-26988 ] Process.create needs to explicitly make individual handles inheritable

noreply at rubyforge.org noreply at rubyforge.org
Tue Sep 1 18:47:09 EDT 2009


Bugs item #26988, was opened at 2009-08-24 14:01
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=411&aid=26988&group_id=85

Category: win32-process
Group: Code
Status: Open
Resolution: None
Priority: 3
Submitted By: Michael Buselli (cosine)
Assigned to: Nobody (None)
Summary: Process.create needs to explicitly make individual handles inheritable

Initial Comment:
I've encountered some versions of Ruby on Windows (in my particular case Ruby 1.9.1 compiled with MinGW) where IO.pipe does not create inheritable handles.  This causes problems when Process.create is used to create a pipe to a child process.  The attached patch to win32-process works around this issue by always explicitly calling SetHandleInformation to make the passed handles inheritable.

----------------------------------------------------------------------

>Comment By: Michael Buselli (cosine)
Date: 2009-09-01 17:47

Message:
No, you're thinking of the :inherit option, which I do have
set to true; Process.create also sets it for you if you are
passing IO handles to child processes.

If the present software is helpful enough to add options it
knows you need—which is why we have high-level functions
like Process.create—it ought to make sure the objects are in
the right state for you (i.e. inheritable), too.

Thanks!

----------------------------------------------------------------------

Comment By: Daniel Berger (djberg96)
Date: 2009-08-30 21:23

Message:
Hi,

Can't you just explicitly set the :process_inherit option to true and get the same effect?

Regards,

Dan

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=411&aid=26988&group_id=85


More information about the win32utils-devel mailing list