gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] sequential startup and stale pid file


From: Kiiski, Janne (EXT-Espotel - FI/Oulu)
Subject: Re: [gpsd-dev] sequential startup and stale pid file
Date: Fri, 20 Mar 2015 06:54:25 +0000

Hi,

Hmm. Before change (bdeff9288fb2dd281a488052222b857a23546e8f) problem 
was pid file with false information. No problem is that there is no pid 
file at all.
My assumption is that subsequent startup attempts should not affect 
state of already running process.
After subsequent startup attempt pid file should still have pid of 
initial/currently running process.

I still think that gpsd should not touch existing pid file until 
"show-stopper" initialization is done (initialization code paths which 
leads to exit(EXIT_FAILURE)).

- janne kiiski

> 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.
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]