Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-07-14 01:08:13 +0400
committerChristopher Faylor <me@cgf.cx>2002-07-14 01:08:13 +0400
commitc03dba93d622f3d81d0c5ccea96f67f095de2631 (patch)
tree6988b4251f344a3fb43bda0e76189aab7159b89b /winsup/cygwin/strace.cc
parent0301bfd0ac66697d974d3855cbf1ebb900c70932 (diff)
* dcrt0.cc (dll_crt0_1): Delay closing of some handles until cygheap has been
set up. (break_here): New function, for debugging. (initial_env): Add program name to "Sleeping" message. Implement new "CYGWIN_DEBUG" environment variable option. * exceptions.cc (debugger_command): Add argument to dumper call. * strace.cc (strace::hello): Use winpid if cygwin pid is unavailable. (strace::vsprntf): Ditto.
Diffstat (limited to 'winsup/cygwin/strace.cc')
-rw-r--r--winsup/cygwin/strace.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/strace.cc b/winsup/cygwin/strace.cc
index d700c780a..91e2cbcd1 100644
--- a/winsup/cygwin/strace.cc
+++ b/winsup/cygwin/strace.cc
@@ -47,7 +47,7 @@ strace::hello()
if (active)
{
prntf (1, NULL, "**********************************************");
- prntf (1, NULL, "Program name: %s (%d)", myself->progname, myself->pid);
+ prntf (1, NULL, "Program name: %s (%d)", myself->progname, myself->pid ?: GetCurrentProcessId ());
prntf (1, NULL, "App version: %d.%d, api: %d.%d",
user_data->dll_major, user_data->dll_minor,
user_data->api_major, user_data->api_minor);
@@ -138,7 +138,8 @@ strace::vsprntf (char *buf, const char *func, const char *infmt, va_list ap)
if ((p = strrchr (progname, '.')) != NULL && strcasematch (p, ".exe"))
*p = '\000';
p = progname;
- count = __small_sprintf (buf, fmt, p && *p ? p : "?", myself->pid,
+ count = __small_sprintf (buf, fmt, p && *p ? p : "?",
+ myself->pid ?: GetCurrentProcessId (),
execing ? "!" : "");
if (func)
count += getfunc (buf + count, func);