* strace.cc (strace::vprntf): Avoid closing unopened handle.

This commit is contained in:
Christopher Faylor 2011-05-02 17:05:10 +00:00
parent 58349d7c9d
commit d85a0c243b
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2011-05-02 Christopher Faylor <me.cygwin2011@cgf.cx>
* strace.cc (strace::vprntf): Avoid closing unopened handle.
2011-05-02 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* sysconf.cc (sca): Set _SC_SPIN_LOCKS to _POSIX_SPIN_LOCKS.

View File

@ -254,8 +254,10 @@ strace::vprntf (unsigned category, const char *func, const char *fmt, va_list ap
FILE_SHARE_WRITE | FILE_SHARE_WRITE,
&sec_none, OPEN_EXISTING, 0, 0);
if (h != INVALID_HANDLE_VALUE)
WriteFile (h, buf, len, &done, 0);
CloseHandle (h);
{
WriteFile (h, buf, len, &done, 0);
CloseHandle (h);
}
}
}