[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] sequential startup and stale pid file
From: |
Eric S. Raymond |
Subject: |
Re: [gpsd-dev] sequential startup and stale pid file |
Date: |
Fri, 13 Mar 2015 06:40:42 -0400 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Kiiski, Janne (EXT-Espotel - FI/Oulu) <address@hidden>:
> Noticed that sequential startup of gpsd produces stale pid file.
>
> Second process overwrites pid file -> fails to bind sockets -> exits ==
> stale pid file.
> So the pid file is (over)written too early (could/should be after
> successfull initialization, just before mainloop).
Good catch! A nice small bug fix for just before we ship the Pi Day release.
I've added a removal of the pid file in the one case startup calls exit() after
it's written - that's if the command socket creation fails.
That should solve the problem; feel free to read the main sequence and tell
me if you think there's another hole I haven't plugged.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>