[LinuxPPS] LinuxPPS for kernel 2.6.26
Cirilo Bernardo
cirilo.bernardo at gmail.com
Tue Jul 15 14:43:26 CEST 2008
On Tue, Jul 15, 2008 at 10:01 PM, Udo van den Heuvel <udovdh at xs4all.nl> wrote:
> Cirilo Bernardo wrote:
[snip]
>> and ppsldisc
>> will have to become psychic to know when to re-open a file. ppsldisc
>> wouldn't need much change to allow it to sit in the background
>> becoming active only every 5 minutes or when a signal is received from
>> the OS.
>
> How do you see the signal things with ppsldisc?
>
"ppsldisc" is a user-space program, so signals can be delivered. The
program can wait for a signal and specify a timeout value; when the
timeout is exceeded, the program may do some things like check if the
configuration file has changed, otherwise go back to waiting for a
signal. When a signal such as "SIGINT" is received (usually sent from
the startup script when it is invoked with "stop") , the program can
close all its open device files and quit.
Another option which is safer than killing ppsldisc is to check the
reference count on the open device files and to exit when all these
counts are >= 2. Of course if you happen to not use a GPS device,
then ppsldisc remains running anyway. However. this still doesn't
address the issue of what to do if someone was playing with ntpd and
dynamically adding and removing refclocks.
- Cirilo
More information about the LinuxPPS
mailing list