lkml.org 
[lkml]   [1996]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: /proc/<pid>/cmdline
Date
Alex K. asked:
: 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?

It's correct. Pipe the cat to cat -v and you can see the NULLs between
the arguments, exactly as they are in argv[]:

~; cat /proc/248/cmdline | cat -v
xterm^@-ls^@-sl^@500^@-font^@7x13^@-sb^@-bg^@black^@-fg^@white

The obvious 'cat -v /proc/248/cmdline' doesn't work, not for me at
least -- anyone know why?

j


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