8 Feb
2023
8 Feb
'23
15:25
http://bugzilla.opensuse.org/show_bug.cgi?id=1197542 http://bugzilla.opensuse.org/show_bug.cgi?id=1197542#c2 --- Comment #2 from Michael Andres <ma@suse.com> --- (In reply to Stelian Ionescu from comment #1)
A quick&dirty solution would be to check a binary against a regex, and if it matches, parse /proc/$PID/cmdline and get the second element.
But that's based on the assumption that the shebang does not use arguments. What if?
$ head -n 1 ./wrzl #! /usr/bin/python3 -u
$ ps | grep wrzl 14212 pts/32 R+ 0:48 /usr/bin/python3 -u ./wrzl
-- You are receiving this mail because: You are on the CC list for the bug.