From: Leonard de R. <lee...@le...> - 2013-04-25 13:17:20
|
Hi Romain, > As for the case where process has closed but PID file is still here, I > do not think it is a big deal and it's probably very unlikely that > another process has this PID and that a USR1 signal to that process > would cause any problem. I agree. Pid numbers are never used twice during a system run, furthermore, the pid files are always killed due to /var/run being a tempfs >> May be there is a way to make the PID creation more fast or create it >> earlier in the process? > > If you use the above method, I believe that PID file is written first > thing after forking, at least according to ocaml-dtools' code. I will investigate this problem somewhat further. It seems the process of forking isn't being logged to the logfile, is that right or am i missing something? Because of this, i'm unable to see what happens before or after the forking process. May be therés something which delays it? Does the daemonizing process check for errors before or after forking, or both? Leonard |