LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* How can I parse the command name from /proc/<pid>/stat?
@ 2014-12-04 19:44 Steven Stewart-Gallus
  2014-12-05 10:34 ` Suzuki K. Poulose
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Stewart-Gallus @ 2014-12-04 19:44 UTC (permalink / raw)
  To: linux-kernel

Hello,

Given an evil hacker trying to confuse process monitors that might use such
strange process names as 'pause) R 0 0 (foo' how can I correctly parse the
command name from /proc/<pid>/stat? Maybe I should just use /proc/<pid>/status?
Maybe there should be some documentation written on the issue? I just wanted to
send an email off to check if I was missing anything before writing a few small
additions to the documentation or filing a bug report. procps-ng seems to use an
ugly hack that involves knowing the limits on the size of a possible command
name that I'm not actually sure works totally correctly.

Thank you,
Steven Stewart-Gallus

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-12-06 23:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-04 19:44 How can I parse the command name from /proc/<pid>/stat? Steven Stewart-Gallus
2014-12-05 10:34 ` Suzuki K. Poulose
2014-12-06 23:04   ` Steven Stewart-Gallus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).