Subject: Re: procmon doesn't capture cygwin's process arguments
From: Brian Inglis <[email-masked]>
To: [email-masked]
Cc: Oleksandr Gavenko <[email-masked]>
Date: Sun, 1 Nov 2020 14:41:55 -0700
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>

On 2020-11-01 10:59, Oleksandr Gavenko via Cygwin wrote:
> I tried to find out what processes emacs-w32 is starting for my custom
> TRAMP method.
> 
> "strace -f emacs-w32" fails.
> 
> I expected to succeed with procmon & its filter " Command/ Process Start".
> 
> Unfortunately procmon [1] doesn't report "argv" if a Cygwin executable is
> started from a Cygwin executable. If I run a Cygwin app from the Windows
> environment it captures positional arguments.
> 
> Is there some option to make positional arguments visible to procmon?
> 
> I could find it in:
> 
> * https://cygwin.com/cygwin-ug-net/using-cygwinenv.html
> * https://cygwin.com/cygwin-ug-net/setup-env.html
> 
> Please keep my email in CC...
> 
> [1] https://docs.microsoft.com/en-us/sysinternals/downloads/procmon

Package procps-ng /usr/bin/procps, and /proc/*/cmdline (null terminated args):

$ procps -aeflw

Suggest:

$ alias cyg-proc=/usr/bin/proc
$ alias proc=/usr/bin/procps

$ head /proc/*/cmdline | cat -A; echo

see attached logs for output.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple