Tim Legant <[EMAIL PROTECTED]> writes: > Given that tmda-ofmipd doesn't have a natural "data" directory, > /var/run seems the best place for the pid file (unless the user > specifies otherwise, of course). Coupled with the desire for > multiple instances, the pid file should probably reflect the port > number: > > /var/run/tmda-ofmipd:8025.pid > > or something similar.
Yup. I notice some daemons create a subdirectory under /var/run/ to house their multiple pid files. This might be a bit cleaner than writing all of them to /var/run/. > My current version of the patch cleans up the pid file on termination, > so the only reason that a pid file would exist is if the daemon > aborted. If I 'kill -9' tmda-ofmipd, will the pid file be cleaned up, or will it linger? > A warning of some sort seems in order, but perhaps the warning > should simply be printed and then the existing pid file should be > overwritten. Why is a warning in order? > If an instance is already running on the same port, tmda-ofmipd will > already have abended with a traceback about not being able to bind the > port, since that occurs before we try to create the pid file. Does > this behavior (print warning, but continue) make more sense? I don't want people to have to manually remove pid files for any reason before they are able to restart tmda-ofmipd; this just doesn't jive with standard daemon behavior that I've seen. I'd vote to just overwrite without printing a warning. _________________________________________________ tmda-workers mailing list ([EMAIL PROTECTED]) http://tmda.net/lists/listinfo/tmda-workers
