[Win32utils-devel] Fwd: win32/process problem

Daniel Berger djberg96 at gmail.com
Thu Dec 6 21:24:51 EST 2007


Heesob Park wrote:
> Hi,
> 
> 2007/12/7, Berger, Daniel <Daniel.Berger at qwest.com 
> <mailto:Daniel.Berger at qwest.com>>:
> 
>      > -----Original Message-----
>      > From: win32utils-devel-bounces at rubyforge.org
>     <mailto:win32utils-devel-bounces at rubyforge.org>
>      > [mailto:win32utils-devel-bounces at rubyforge.org
>     <mailto:win32utils-devel-bounces at rubyforge.org>] On Behalf Of
>      > Daniel Berger
>      > Sent: Thursday, December 06, 2007 5:18 AM
>      > To: Development and ideas for win32utils projects
>      > Subject: Re: [Win32utils-devel] Fwd: win32/process problem
>      >
>      > Heesob Park wrote:
>      >
>      > <snip>
>      >
>      > > Though it is doubtful whether this is the cause or not,
>      > Insert flowing
>      > > two lines before ProcessInfo.new (line #409 of
>      > > process.rb) might be helpful.
>      > >
>      > >       CloseHandle(procinfo[8,4].unpack('L').first)
>      > >       CloseHandle(procinfo[12,4].unpack('L').first)
>      >
>      > I'm somewhat afraid to do that, because I can't be sure other
>      > people aren't using the process handle afterwards.
>      >
>      > At the very least I should document that, however. Hmm, let
>      > me mull it over.
> 
>     Ok, what if we add a "close_handles" option to Process.create? If set to
>     true (the default), we'll close the handles automatically before
>     returning from the method. Users could explicitly set it to false if
>     they want to keep the handles open.
> 
>     Seem reasonable?
> 
>  
> Yes, it seems reasonable.
>  
> BTW, how about your thought about supporting Process.create as 
> a different user with CreateProcessWithLoginW API ?

I think it's a good idea. Let's add a "with_logon" option as well. If 
set, it will call CreateProcessWithLoginW behind the scenes.

Any chance I could get you to patch win32-eventlog to handle the other 
message files so I can work on this instead this weekend? BTW, I've made 
a couple minor commits since 0.4.6, so you'll want to grab the latest 
from CVS (there were some bugs in a few error messages).

Thanks,

Dan


More information about the win32utils-devel mailing list