Program shows console output even though stdout and stderr are redirected Program shows console output even though stdout and stderr are redirected unix unix

Program shows console output even though stdout and stderr are redirected


It's opening the underlying terminal directly (something like open("/dev/tty", ...)). No amount of redirecting will get rid of that. If you don't want to see it, you'll have to run it not attached to a tty (e.g. through cron or something).


It opens your terminal and writes there:

open("/dev/tty", O_RDWR|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 3...write(3, "Password: ", 10Password: )              = 10

Run it under setsid if you want to make that impossible.


You're just redirecting stderr to /dev/null try vncpasswd &> /dev/null instead.