[Win32utils-devel] [Fwd: open3.c patch]

Heesob Park phasis at gmail.com
Thu Mar 5 20:39:07 EST 2009


2009/3/6 Daniel Berger <djberg96 at gmail.com>:
> This look good?
>
> Dan
>
> Hi Daniel,
> We're using win32/open.  We started seeing apparently bogus exit codes with
> 0.2.6, so we updated to 0.2.8.  The fixes sounded right on the money, but
> the problem didn't go away.  I debugged a bit further and saw that we were
> getting an invalid handle exception.  Looks like one more tweak is needed to
> get the exit code handling exactly right.
>
> --- open3.c.orig        Thu Mar 05 11:02:16 2009
> +++ open3.c     Thu Mar 05 11:05:33 2009
> @@ -281,9 +281,9 @@
>
>    if(pid_handle != NULL){
>       GetExitCodeProcess(pid_handle, &status);
> -      CloseHandle(pid_handle);
>
>       if(status != STILL_ACTIVE){
> +         CloseHandle(pid_handle);
>          pid_handle = NULL;
>          win32_set_last_status(status, file->pid);
>       }
>
> thanks for all the great code.
> :)ross
>
That looks good.

Regards,

Park Heesob


More information about the win32utils-devel mailing list