|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The proximate cause was that we've been seing emission of error
messages that were randomly and disturbingly variable across different
environments - notably Raspbian and Gentoo splint gave nontrivially
different results than Ubuntu 14.10 splint. And this was *not* due to
Ubuntu patches! A pristine splint built from the 3.1.2 tarball on
Ubuntu didn't match the Raspbian and Gentoo results either.
But this has been coming for a while. Easy access to more modern
static analyzers such as coverity, scan-build and cppcheck has been
decreasing the utility of splint, which is unmaintained and somewhat
buggy and not easy to use.
Only file not cleaned is ppsthread.c, because Gary has been working
on it during this cleanup.
All regression tests pass. PPS observed live on GR601-W.
|
|
The attached patch allows to use gpsd together with socket activation
in systemd. The idea is that systemd listens to the control socket
and TCP sockets and, as soon as someone connects to them, starts gpsd
and passes the file descriptors over (without accept()ing itself).
Sockets are in the following order: fd 3 is the control socket,
followed by up to two TCP sockets (for IPv4 and IPv6). If no socket
passing happens, behaviour of gpsd should be the same as before.
For using this new feature, one could use the following config *skeleton*:
-> File /etc/systemd/system/gpsd.socket:
[Socket]
ListenStream=/var/run/gpsd.sock
ListenStream=127.0.0.1:2947
-> File /etc/systemd/system/gpsd.service:
[Unit]
Requires=gpsd.spcket
[Service]
type=simple
ExecStart=/usr/bin/gpsd -N
What has been tested:
- gpsd compiles fine with both systemd=true/false
- Socket activation on the TCP socket works (gpsd is started, version string
is sent)
What has not been tested:
- Socket activation on the control socket works
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
|