On Fri, Sep 5, 2008 at 11:14 AM, Hal Duston <hald@kc.rr.com> wrote:
 
> A process can change the arguments at any time w/o doing an exec.  I have
> actually read the code that is needed to do this under Linux.  It is less
> than 15 lines.  All it does is rebuild the environment which is where the
> exec'ed command line arguments are kept.  Once they are rebuilt ps,  top,
> and everything else just pick them up from /proc/<pid>/cmdline.

Wow.  I had no idea.  Here I thought ps got that info from an internal kernel data structure that wasn't manipulable by userland.  That suggests some really ugly possibilities.