exit code weirdness in fatal()

Damien Miller djm at mindrot.org
Sun Feb 18 12:37:46 EST 2001


On Sat, 17 Feb 2001, Pekka Savola wrote:

> Hello all,
> 
> I came across the following with the latest snapshot (and previous):
> 
> (just trying to start sshd when it's already running)
> 
> # ./sshd -d
> [snip]
> socket: Invalid argument
> debug1: Bind to port 22 on 0.0.0.0.
> fatal: Cannot bind any address.
> # echo $?
> 255
> 
> # ./sshd
> # echo $?
> 0
> 
> with './sshd', the same fatal message is printed to syslog.
> 
> This seems critically wrong on systems that check what sshd's exit
> status was to see if it should have started running without problems.

This is because sshd has already daemonised by that point. 

-d

-- 
| Damien Miller <djm at mindrot.org> \ ``E-mail attachments are the poor man's 
| http://www.mindrot.org          /   distributed filesystem'' - Dan Geer






More information about the openssh-unix-dev mailing list