[PATCH] Cleanup: Close handles in script.cc:run()

Max Bowsher maxb@ukf.net
Sat Mar 15 19:03:00 GMT 2003


Pavel Tsekov wrote:
> On Sat, 15 Mar 2003, 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>:
>
>    if (b)
>      WaitForSingleObject (pi.hProcess, INFINITE);
> +
> +  CloseHandle(pi.hProcess);
> +  CloseHandle(pi.hThread);
>  }
>
> I guess it doesn't matter actually, but isn't it better to close the
> thread handle before the process handle ?!

Probably not better, but it feels nicer.

Max.



More information about the Cygwin-apps mailing list