<div dir="ltr">On Fri, Sep 5, 2008 at 11:14 AM, Hal Duston <span dir="ltr"><<a href="mailto:hald@kc.rr.com">hald@kc.rr.com</a>></span> wrote:<br><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div class="Wj3C7c">> A process can change the arguments at any time w/o doing an exec. I have<br>
> actually read the code that is needed to do this under Linux. It is less<br>
> than 15 lines. All it does is rebuild the environment which is where the<br>
> exec'ed command line arguments are kept. Once they are rebuilt ps, top,<br>
> and everything else just pick them up from /proc/<pid>/cmdline.<br>
</div></div></blockquote></div><br>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.<br></div>