On 08/31/2017 11:55 AM, Dianne Skoll wrote: > >> You'll have to forgive the stupid question since I'm not a regular >> user of MIMEDefang, but what's the purpose of the file lock? Is it to >> prevent multiple daemons from running at the same time when they're >> not managed by an init system? > > Yep. In the days of systemd and the like, this is probably not > necessary, but not everyone runs systemd.
Hmmm, in that case, maybe the PID file is being reused for a purpose that it isn't really suited for? The contents of the PID file are slightly sensitive, since init scripts tend to trust them -- but the contents of a lock file aren't. Would it make more sense to have a separate lock file, whose only purpose is to prevent multiple daemons from starting (and not to provide info to an init system)? > If people do use systemd or whatever, then they'd start mimedefang and > mimedefang-multiplexor without the options that create the pidfiles > and let systemd manage the processes. Yeah, this is pretty much only an issue for traditional SysV-style init systems, because trying to answer "can I trust the contents of this PID file?" is next to impossible in portable shell script. _______________________________________________ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang