there has been much discussion in the past about programs that modify their behaviour depending on what stdout is;
http://harmful.cat-v.org/cat-v/unix_prog_design.pdf
i do to want to start a war, just suggest a different approach is available.
my suggestion would be to always expect a password from standard input and to do document this, suggesting, for non-interactive use people could do something like:
echo password | application
using environment variables or passing passwords on the command line are rather leaky.
-Steve