Comment 17 for bug 98955

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

The logd problem is the way it works (the following is a summary, see logd(8) for more protocol detail):

Jobs specify "console logged" (once the default) in their definition, this means that Upstart will open a connection to logd for the job and bind that socket to the job's standard input/output.

The first problem was that logd needed to start before all other processes, otherwise they wouldn't be logged - so it needed to be special cased. Special casaes are bad.

The second problem was that most jobs (especially shell scripts) react quite badly to their standard output returning EBADF and just vanish -- this caused the shutdown process to suddenly stop mid-flow after it sent SIGTERM to logd.

logd should be replaced by some standard logging daemon and protocol; though that should allow Upstart to tell the logging daemon what the job details are for the process so logs can be separated.