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 + + * strace.cc (strace::vsprntf): Avoid printing a zero pid. + 2005-09-27 Corinna Vinschen * 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);