Cygwin: strace: print windows and cygwin pid in event output

strace only printed the Windows PID in event output so far.

Especially now that Windows and Cygwin PID are decoupled, the
strace user might like to see the Cygwin pid in event output as
well.  However, at process startup, the process might not have
a Cygwin PID yet.

To mitigate this, always print the Windows PID and only add the
Cygwin pid if it exists.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2019-03-23 17:50:00 +01:00
parent 10900b98d1
commit ae3370bb9d
3 changed files with 42 additions and 13 deletions

View File

@ -331,6 +331,10 @@ cygwin_internal (cygwin_getinfo_types t, ...)
}
break;
case CW_MAX_CYGWIN_PID:
res = MAX_PID;
break;
case CW_EXTRACT_DOMAIN_AND_USER:
{
WCHAR nt_domain[MAX_DOMAIN_NAME_LEN + 1];