Description of problem: For processes with missing argv[0] ps(1) displays 5984 pts/0 TN 0:00 [exe] 12515 pts/0 TNl 0:00 [exe] (the constant string "[exe]" although it could display at least the basename of readlink ("/proc/self/exe"). Version-Release number of selected component (if applicable): kernel-2.6.23-0.195.rc7.git3.fc8.x86_64 How reproducible: Always. Steps to Reproduce: 1. Run an attached testcase simulating program with missing argv[0]. Actual results: exe FAIL Expected results: missing-argv PASS Additional info: ps(1) just produces the output of `/proc/PID/exe' where for missing argv[0] kernel displays: Name: exe Unaware why "exe". It could be also workarounded by ps(1) (but it would need to check for the empty `/proc/PID/cmdline' or so).
Created attachment 211341 [details] Testcase.
I'm not sure what's going on here. Maybe the glibc guys have some ideas. Jakub? Uli?
Notabug, sorry. It is "exe" as it execs "/proc/self/exe" - the basename. Unsure where I have seen it initially but kernel behaves right for this testcase, executing "/tmp/foobar" with argv[0]==NULL makes the process `comm' "foobar".