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.]
$ head /proc/*/cmdline | cat -A; echo ==> /proc/17834/cmdline <==$ /bin/sh^@/usr/bin/startxwin^@$ ==> /proc/17934/cmdline <==$ xinit^@/etc/X11/xinit/startxwinrc^@--^@/usr/bin/XWin^@:0^@-multiwindow^@-auth^@$HOME/.serverauth.17834^@$ ==> /proc/17935/cmdline <==$ /usr/bin/XWin^@:0^@-multiwindow^@-auth^@$HOME/.serverauth.17834^@$ ==> /proc/17938/cmdline <==$ /usr/bin/xwin-xdg-menu^@$ ==> /proc/17951/cmdline <==$ dbus-launch^@--sh-syntax^@--exit-with-session^@$ ==> /proc/17952/cmdline <==$ /usr/bin/dbus-daemon^@--fork^@--print-pid^@5^@--print-address^@7^@--session^@$ ==> /proc/17956/cmdline <==$ /usr/bin/gnome-keyring-daemon^@--start^@--components=pkcs11^@$ ==> /proc/17964/cmdline <==$ /usr/bin/fbxkb^@$ ==> /proc/17966/cmdline <==$ /usr/libexec/gam_server^@$ ==> /proc/32326/cmdline <==$ ssh-agent^@$ ==> /proc/34859/cmdline <==$ pcmanfm^@$ ==> /proc/349/cmdline <==$ /usr/bin/mintty^@-s^@120x60^@-p^@210,120^@-^@$ ==> /proc/350/cmdline <==$ -bash^@$ ==> /proc/374/cmdline <==$ /usr/bin/cygrunsrv$ ==> /proc/375/cmdline <==$ /usr/bin/cygrunsrv$ ==> /proc/376/cmdline <==$ /usr/sbin/cygserver$ ==> /proc/377/cmdline <==$ /usr/bin/cygrunsrv$ ==> /proc/378/cmdline <==$ /usr/sbin/cron$ ==> /proc/379/cmdline <==$ /usr/sbin/syslog-ng$ ==> /proc/41273/cmdline <==$ /usr/bin/xman^@-pagesize^@600x800+1300+200^@$ ==> /proc/42875/cmdline <==$ head^@/proc/17834/cmdline^@/proc/17934/cmdline^@/proc/17935/cmdline^@/proc/17938/cmdline^@/proc/17951/cmdline^@/proc/17952/cmdline^@/proc/17956/cmdline^@/proc/17964/cmdline^@/proc/17966/cmdline^@/proc/32326/cmdline^@/proc/34859/cmdline^@/proc/349/cmdline^@/proc/350/cmdline^@/proc/374/cmdline^@/proc/375/cmdline^@/proc/376/cmdline^@/proc/377/cmdline^@/proc/378/cmdline^@/proc/379/cmdline^@/proc/41273/cmdline^@/proc/42875/cmdline^@/proc/49760/cmdline^@/proc/49765/cmdline^@/proc/self/cmdline^@ ==> /proc/49760/cmdline <==$ dirmngr^@--daemon^@--homedir^@$HOME/.gnupg^@$ ==> /proc/49765/cmdline <==$ gpg-agent^@--homedir^@$HOME/.gnupg^@--use-standard-socket^@--daemon^@$ ==> /proc/self/cmdline <==$ head^@/proc/17834/cmdline^@/proc/17934/cmdline^@/proc/17935/cmdline^@/proc/17938/cmdline^@/proc/17951/cmdline^@/proc/17952/cmdline^@/proc/17956/cmdline^@/proc/17964/cmdline^@/proc/17966/cmdline^@/proc/32326/cmdline^@/proc/34859/cmdline^@/proc/349/cmdline^@/proc/350/cmdline^@/proc/374/cmdline^@/proc/375/cmdline^@/proc/376/cmdline^@/proc/377/cmdline^@/proc/378/cmdline^@/proc/379/cmdline^@/proc/41273/cmdline^@/proc/42875/cmdline^@/proc/49760/cmdline^@/proc/49765/cmdline^@/proc/self/cmdline^@
$ procps -aeflw F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD 0 S $USER 350 349 0 80 0 - 140 - Oct24 pty0 00:01:13 -bash 0 S SYSTEM 376 374 0 80 0 - 0 - Oct13 ? 00:30:46 /usr/sbin/cygserver 0 S $USER 41273 350 0 80 0 - 231 - Oct31 pty0 00:00:03 /usr/bin/xman -pagesize 600x800+1300+200 0 S $USER 49765 1 0 80 0 - 95 - Oct26 ? 00:01:16 gpg-agent --homedir $HOME/.gnupg --use-standard-socket --daemon 0 S $USER 49760 1 0 80 0 - 349 - Oct26 ? 00:00:11 dirmngr --daemon --homedir $HOME/.gnupg 0 S SYSTEM 379 377 0 80 0 - 0 - Oct13 ? 00:00:46 /usr/sbin/syslog-ng 0 S $USER 32326 1 0 80 0 - 84 - Oct18 ? 00:00:00 ssh-agent 0 S $USER 17938 17934 0 80 0 - 201 - Oct13 ? 00:03:56 /usr/bin/xwin-xdg-menu 0 S $USER 34859 17938 0 80 0 - 252 - 08:39 ? 00:00:45 pcmanfm 0 S $USER 17966 1 1 80 0 - 217 - Oct13 ? 08:46:56 /usr/libexec/gam_server 0 S $USER 17951 1 0 80 0 - 84 - Oct13 ? 00:00:00 dbus-launch --sh-syntax --exit-with-session 0 S $USER 17935 17934 0 80 0 - 2112 - Oct13 cons0 00:57:53 /usr/bin/XWin :0 -multiwindow -auth $HOME/.serverauth.17834 0 S $USER 17956 1 0 80 0 - 128 - Oct13 ? 00:01:22 /usr/bin/gnome-keyring-daemon --start --components=pkcs11 0 S $USER 349 1 0 80 0 - 288 - Oct24 ? 01:26:40 /usr/bin/mintty -s 120x60 -p 210,120 - 0 R $USER 42895 350 0 80 0 - 98 - 14:34 pty0 00:00:00 procps -aeflw 0 S $USER 17952 1 0 80 0 - 89 - Oct13 ? 00:00:03 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session 0 S $USER 17964 17938 0 80 0 - 124 - Oct13 ? 00:00:47 /usr/bin/fbxkb 0 S $USER 17934 17834 0 80 0 - 84 - Oct13 cons0 00:00:00 xinit /etc/X11/xinit/startxwinrc -- /usr/bin/XWin :0 -multiwindow -auth $HOME/.serverauth.17834 0 S SYSTEM 378 375 0 80 0 - 0 - Oct13 ? 00:00:12 /usr/sbin/cron 0 S $USER 17834 1 0 80 0 - 80 - Oct13 cons0 00:00:00 /bin/sh /usr/bin/startxwin
-- 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