On 7/3/14 4:23 PM, Gabriela Gibson wrote: > Could that be because of the libtool svn-lt script that sits in the middle? > Because in gdb it does change, but not in ps.
No because I wasn't even doing anything with Subversion yet let alone libtool. It was just a very basic C program with nothing more than a main. It's probably because the argv array belongs to the process itself and then it points to memory that the kernel owns (or at least watches). I'm not sure on all the details of how the kernel starts the binary and passes in the arguments. I've attached the example I was working with that didn't make it to this list already.
#include <stdlib.h> #include <unistd.h> #include <string.h> int main (int argc, char *argv[]) { int i; for (i = 0; i < argc; i++) { if (!strcmp(argv[i], "--password")) { char *p = argv[++i]; while (*p) { *p++ = '*'; } } } sleep(3600); }