"Jason R. Mastaler" <[EMAIL PROTECTED]> writes:

> Tim Legant <[EMAIL PROTECTED]> writes:
>
>> +            except OSError, e:
>> +                if e.errno == errno.EEXIST:
>> +                    msg = "File '%s' already exists.  Another copy of tmda-" \
>> +                          "ofmipd is already running or a previous run of " \
>> +                          "tmda-ofmipd aborted, leaving the file.  Either " \
>> +                          "remove '%s' by hand or use the --pidfile flag to " \
>> +                          "specify a different file in which to store the " \
>> +                          "PID." % (pidfile, pidfile)
>> +                    warning(msg)
>
> Do you think this is the right thing to do?  Most daemons seem to just
> overwrite an existing pid file when started.  In the case of multiple
> daemons running on different ports, the pid file just reflects the
> process ID of the one started last.

Well, I think that there should be one pid file for each port on which
the daemon is running.  On my box, I only run one tmda-ofmipd daemon,
and I use the pid in the file to kill the daemon when I want to, as well
as to make sure that I don't try to start multiple occurrences.

If a daemon is running, I always want the pid to point to _that_ daemon.


> Phrased another way, I'm not sure what benefit there is to aborting if
> /var/run/tmda-ofmipd.pid already exists, but I can foresee situations
> where this would be really annoying.

Well, if there is one pid file per tmda-ofmipd port, then the problem
doesn't exist.

-- 
 Lloyd Zusman
 [EMAIL PROTECTED]

_________________________________________________
tmda-workers mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-workers

Reply via email to