This is the mail archive of the
mailing list for the Cygwin project.
Re: [PATCH] Cleanup: Close handles in script.cc:run()
- From: Igor Pechtchanski <pechtcha at cs dot nyu dot edu>
- To: Robert Collins <rbcollins at cygwin dot com>
- Cc: cygwin-apps at cygwin dot com
- Date: Sun, 16 Mar 2003 18:13:48 -0500 (EST)
- Subject: Re: [PATCH] Cleanup: Close handles in script.cc:run()
- Reply-to: cygwin-apps at cygwin dot com
On Sun, 16 Mar 2003, Robert Collins wrote:
> Igor Pechtchanski wrote:
> > The attached patch closes the unneeded handles in run() in script.cc.
> > Those handles should be closed according to
> > <http://msdn.microsoft.com/library/en-us/dllproc/base/createprocess.asp>:
> > lpProcessInformation
> > [out] Pointer to a PROCESS_INFORMATION structure that receives
> > identification information about the new process.
> > Handles in PROCESS_INFORMATION must be closed with CloseHandle
> > when they are no longer needed.
> > Feel free to reject if my understanding of the above is incorrect.
> > Igor
> > ==============================================================================
> > ChangeLog:
> > 2003-03-15 Igor Pechtchanski <pechtcha at cs dot nyu dot edu>
> > * script.cc (run): Close unneeded handles.
BTW, this may not matter, but I agree with Max and Pavel that it's nicer
to close the thread handle before the process one. I've submitted the
accordingly modified patch in
<http://cygwin.com/ml/cygwin-apps/2003-03/msg00469.html>. If you think it
doesn't matter, though, then leave it as-is.
|\ _,,,---,,_ pechtcha at cs dot nyu dot edu
ZZZzz /,`.-'`' -. ;-;;,_ igor at watson dot ibm dot com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!