Tim Meadowcroft wrote:
cd $HOME/qpsmtpd && ( ( ./qpsmtpd >&3 ) 2>&1 ) 3>&1
The parentheses here are significant (they start subshells). The innermost parens means that qpsmtpd's STDOUT should be redirected to handle 3. Then the next layer redirects that processes STDERR to handle 1. And finally the last redirect sends the contents of handle 3 to STDOUT again (which should be the log file not the socket). I believe that the correct way to write that would be:
cd $HOME/qpsmtpd && ( ( ./qpsmtpd >&3 ) 2>&3 ) 3>&1
but I'm not an xinetd user, so I may be misunderstanding how to handle that.
./qpsmtpd 2>&1
So I was wondering is there some good reason why STDERR is being redirected down the socket, or is it just a case of a "scripter's twitch reaction" adding 2>&1 where it is, perhaps, not such a great idea ?
Except that in the case of the tcpserver "run" file, the redirect points STDERR to STDOUT, which is where the log entries go; this has nothing to do with the socket.
John
