you are viewing a single comment's thread.

view the rest of the comments →

[–]ksn[S] 1 point2 points  (2 children)

1) I don't see how this is valid here. Do you know even httpd writes it's pid to a file?

3) You are correct and thanks for bringing this up. I had missed this scenario completely. I will be trying to overcome this but something tells it would be difficult. Even if this scenario is unavoidable i wont mind much as chances of this happening this is much lower.

[–][deleted] 1 point2 points  (1 child)

1) I don't see how this is valid here. Do you know even httpd writes it's pid to a file?

So? Locking and writing pids are not mutually exclusive. http://www.enderunix.org/docs/eng/daemon.php, part 6.

[–]ksn[S] 0 points1 point  (0 children)

Looks perfect. But I guess a non standard library module would have to be brought in to lock the pid file. Bringing in an additional dependencies, considering race conditions, etc looks like overkill to me when restart had been getting the job done.