summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-10-19 11:32:35 -0400
committerEric S. Raymond <esr@thyrsus.com>2013-10-19 11:32:35 -0400
commit93843896f54f00a180ab16efc202f0f64e6b47e3 (patch)
treeb1b43ecfd8c5dba2f1a2bf3878ffbfe6aa560e4a /gpsd.c
parent316162626e183918010eecbcdf57d3029de9b1a7 (diff)
downloadgpsd-93843896f54f00a180ab16efc202f0f64e6b47e3.tar.gz
Documentation, comment, and HOWTO updates.
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gpsd.c b/gpsd.c
index d05ec7a6..2c155339 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -1952,6 +1952,11 @@ int main(int argc, char *argv[])
if (nice(NICEVAL) == -1 && errno != 0)
gpsd_report(context.debug, LOG_INF, "NTPD Priority setting failed.\n");
}
+ /*
+ * By initializing before we drop privileges, we guarantee that even
+ * hotplugged devices added *after* we drop privileges will be able
+ * to use segments 0 and 1.
+ */
(void)ntpshm_init(&context, NOWAIT);
#endif /* NTPSHM_ENABLE */