diff options
author | Christopher Faylor <me@cgf.cx> | 2005-09-27 22:54:32 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-09-27 22:54:32 +0400 |
commit | e0be0a1d50bc7d10601d44c98d95b2132aca5033 (patch) | |
tree | f3caa3160ffc77fd932db0a33f3ec6f04f5a814b /winsup/cygwin | |
parent | 91049bd9cdbab9a4cb137938cbea58a5fbf61a85 (diff) |
* strace.cc (strace::vsprntf): Avoid printing a zero pid.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 4 | ||||
-rw-r--r-- | winsup/cygwin/strace.cc | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 59e1f023b..f58ed1ed9 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2005-09-27 Christopher Faylor <cgf@timesys.com> + + * strace.cc (strace::vsprntf): Avoid printing a zero pid. + 2005-09-27 Corinna Vinschen <corinna@vinschen.de> * init.cc (dll_entry): Call IsWow64Process with GetCurrentProcess diff --git a/winsup/cygwin/strace.cc b/winsup/cygwin/strace.cc index 104be711b..54fab722a 100644 --- a/winsup/cygwin/strace.cc +++ b/winsup/cygwin/strace.cc @@ -149,7 +149,7 @@ strace::vsprntf (char *buf, const char *func, const char *infmt, va_list ap) *p = '\000'; p = progname; count = __small_sprintf (buf, fmt, p && *p ? p : "?", - myself ? myself->pid : GetCurrentProcessId (), + (myself && myself->pid) ? myself->pid : GetCurrentProcessId (), execing ? "!" : ""); if (func) count += getfunc (buf + count, func); |