upstart assumes we can stop tracing processes when exec() is called, breaks 'expect daemon' for cups
trying to improve the cups upstart job in Ubuntu to use 'expect daemon' so that the service is reliably up before upstart proceeds on to running the post-start script, I find that this doesn't work because cups re-execs itself with different commandline options before daemonizing. upstart init/job_process.c has the following:
* We assume that if the job calls exec that it's finished forking so we can
* drop the trace entirely; we have no interest in tracing the new child.
Well, cups obviously violates this expectation, because it unavoidably re-execs itself.
Is the upstart assumption wrong? Is this sanely *fixable* without causing knock-on effects?
DistroRelease: Ubuntu 11.10
Package: upstart 1.3-0ubuntu9
Uname: Linux 3.0.0-11-generic x86_64
Date: Tue Sep 20 11:03:08 2011
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1)
UpgradeStatus: Upgraded to oneiric on 2011-06-27 (85 days ago)