Revert "server: Listen on command socket before daemonizing."
authorAndre Noll <maan@systemlinux.org>
Fri, 11 Nov 2011 20:50:56 +0000 (21:50 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 13 Nov 2011 13:30:04 +0000 (14:30 +0100)
This reverts commit 7a4b6d5f19976ceac581f6dc235fcbd9b30c767f, which
was a rather bad idea because it caused the afs process to inherit
the open file descriptor of the command socket, so two processes
listened on the command socket at the same time.

Even worse, the afs process also inherited the command task in its
scheduler setup, causing it to answer incoming connections as well.
In fact it was more or less random which of the two processes served
an incoming connection.

If it was the afs process, interesting things happened in the command
handler due to its address space being a copy of the afs process,
where parts of what is needed for some commands not properly set
up. For example the si and the sender commands segfaulted due to a
NULL pointer dereference.

It's weird that this bug was not noticed earlier.


No differences found