> "disco master nodaemon" starts master in the erlang shell without daemonizing it.
Yeah, unfortunately it attaches `supervise' to the Python process rather than the beam one, and I've had trouble in the past where Erlang crashes in some weird way and won't launch again(which is why I'm using supervise in the first place), but the containing process (Python) keeps on running, so supervise can't intervene and isn't really supervising anything. But anyway, a workaround will be fine for my testing phase, which brings me to my next point:
> I'm not sure how well the interactive shell works with daemontools but it might be ok.
Sadly, this doesn't appear to be true :-/ If I launch it interactively it works fine, but when launched from supervise, it crashes like this:
Eshell V5.7.5 (abort with ^G)
(disco_4444_master@mrhost)1> *** Terminating erlang (disco_4444_master@mrhost)
Eshell V5.7.5 (abort with ^G)
(disco_4444_master@mrhost)1> *** Terminating erlang (disco_4444_master@mrhost)
Eshell V5.7.5 (abort with ^G)
(disco_4444_master@mrhost)1> *** Terminating erlang (disco_4444_master@mrhost)
(of course the repeats are because after it crashes, `supervise' restarts it). supervise is calling this run-script:
#!/bin/sh
export HOME=/home/mruser
cd $HOME/disco
exec 2>&1
exec setuidgid mruser bin/disco master nodaemon
So nothing especially fancy is happening. It works interactively, and I'm not setting any environment variables or anything in the interactive shell, so they should behave pretty identically. It's especially strange that erlang starts and then is terminated, rather than just not working at all.
Also, sometimes (maybe 1/50 times) it isn't terminated immediately, sometimes it has time for SASL to spit out some messages.
Eshell V5.7.5 (abort with ^G)
(disco_4444_master@mrhost)1> *** Terminating erlang (disco_4444_master@mrhost)
Eshell V5.7.5 (abort with ^G)
=INFO REPORT==== 20-Apr-2010::17:02:27 ===
{"DISCO BOOTS"}
=INFO REPORT==== 20-Apr-2010::17:02:27 ===
{"Event server starts"}
=INFO REPORT==== 20-Apr-2010::17:02:27 ===
{"DISCO SERVER STARTS"}
=INFO REPORT==== 20-Apr-2010::17:02:27 ===
{"Fair scheduler starts"}
=INFO REPORT==== 20-Apr-2010::17:02:27 ===
{"Scheduler uses fair policy"}
=INFO REPORT==== 20-Apr-2010::17:02:27 ===
{"Fair scheduler: Fair policy"}
=INFO REPORT==== 20-Apr-2010::17:02:27 ===
{"Config table update"}
=INFO REPORT==== 20-Apr-2010::17:02:27 ===
{"OOB server starts"}
=INFO REPORT==== 20-Apr-2010::17:02:27 ===
{'SCGI SERVER STARTS'}
(disco_4444_master@mrhost)1> *** Terminating erlang (disco_4444_master@mrhost)
Eshell V5.7.5 (abort with ^G)
(disco_4444_master@mrhost)1> *** Terminating erlang (disco_4444_master@mrhost)
Other than the returning to its death-loop, this looks identical to when it starts successfully when I run it interactively. If I refresh fast enough, lighttpd will even get a request or two off before being killed again.
Anyone seen this before? I have other Erlang processes running just fine from supervise