lkml.org 
[lkml]   [1996]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: /proc/<pid>/cmdline
Date
Thus spake Mr A.M. Kruczkowski:
> A brief observation that on my system, cat of /proc/<pid>/cmdline gives
> the cmdline minus spaces between the arguments. Is this correct,
> is my system in need of an upgrade somewhere, or is it an error?

neon:~$ cat -v /proc/2890/cmdline
elm^@-f=kernelneon:~$ ps
PID TTY STAT TIME COMMAND
2869 p1 S 0:00 -bash
2890 p1 T 0:00 elm -f=kernel
2899 p1 R 0:00 ps
neon:~$

It separates the argv components with \0s. Otherwise, you couldn't
distinguish between
rm the file
and
rm "the file"
, etc.

Mike

--
#> Mike Shaver (shaver@ingenia.com) Information Warfare Division <#
#> Chief Tactical and Strategic Officer "Saepe fidelis" <#
#> <#
#> "I like your game, but we have to change the rules." -- Anon <#
#> <#


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.050 / U:2.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site