in reply to hiding passwords
How about in the environment that launches the script (this is for Linux): ulimit -c 0
- limits core files to 0 bytes, hence nothing to snoop on.