> 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?
No -- they're actually delimited by null characters, which don't
appear as anything when output to your screen. If you "cat
/proc/<pid>/cmdline | less" you'll see things more clearly.
Just about anything, including a space, can be a valid character
_within_ an argument, so only a null can properly delimit two
arguments -- that's why they're used instead of spaces.
Consider the following command:
grep "foo bar" baz
You couldn't accurately represent that in /proc/<pid>/cmdline if
spaces delimited arguments.
-Peter
PS: I'm not sure this thread belonged in linux-kernel to begin with;
move further discussion to email, please.