Vincent Bernat <ber...@debian.org> writes: > ❦ 29 août 2016 05:00 CEST, Russ Allbery <r...@debian.org> :
>> upstart supports a similar mechanism via the -Z flag, but it's (IMO) a >> little less clean: the process sends itself a SIGSTOP when it's ready, >> and then lets the init system send it a SIGCONT. This does work, but I >> don't like it as much; pausing for the init system is awkward, you have >> to remember to omit the flag when running the daemon manually for >> debugging > You can look at the UPSTART_JOB environment variable to determine if you > are running from Upstart or not. You can't, really, because it's an environment variable, so it will get inherited by things run by upstart jobs but that are not themselves upstart jobs. It's a 90% solution that fails in edge cases. (The world of init systems is full of stuff like that. It's very frustrating.) -- Russ Allbery (r...@debian.org) <http://www.eyrie.org/~eagle/>