in reply to How best to hide command-line arguments from ps command?

While it's not 100% secure, you can always reassign the value of $0 first thing in your script. That's the variable that ends up controlling how your process shows up in the process listing.

The MySQL shell client, for example, is careful to "x" out your password so that it doesn't show up in a process listing. What you see is something like mysql --username=foo --password=xxxxx instead of your actual password.
  • Comment on Re: How best to hide command-line arguments from ps command?

Replies are listed 'Best First'.
Re: Re: How best to hide command-line arguments from ps command?
by sauoq (Abbot) on Nov 18, 2003 at 22:19 UTC

    This won't work on all platforms.

    -sauoq
    "My two cents aren't worth a dime.";
    
    A reply falls below the community's threshold of quality. You may see it by logging in.