Skip to content
Tcl Source Code Artifact [7a54891f43]
Login

Artifact [7a54891f43]

Artifact 7a54891f436ab824308d0f415dfc74288cf5cd45:

Ticket change [7a54891f43] - Ticket [1224888fffffffff|1224888fff] <i>possible to have an empty info nameofexecutable</i> status still Open with 4 other changes by dkf on 2011-10-12 16:49:56.
D 2011-10-12T16:49:56
J icomment Doing\sa\sreadlink()\son\s/proc/[pid]/exe\sis\selegant,\sbut\swon't\swork\son\sOSX.\sThere,\sthe\sonly\sreliable\smethod\sI've\sfound\sfor\sgetting\sthe\sexecutable\spath\sfrom\sthe\sPID\sis\sby\scalling\slsof\sin\sa\ssubprocess:\n\n\s\slsof\s-a\s-p\s[pid]\s-F\sn\s-d\stxt\n\nThen\syou\sneed\sthe\sfirst\sline\sthat\sstarts\swith\s'n',\sand\syou\sneed\sall\sof\sthat\sline\sexcept\sthe\sfirst\scharacter.\sUgh.\sWorks\sthough.\s(Poking\sin\sthe\snormal\ssystem\sprocess\sinformation\sdoesn't\swork;\sthat\sgives\syou\sthe\sprocess\sname\swithout\sthe\spath\sto\sit.)\n
J login dkf
J mimetype text/plain
J username dkf
K 1224888fffffffffffffffffffffffffffffffff
U dkf
Z 19cbad3ced93125a57cfaa961d0fede1