summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gpsd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gpsd.c b/gpsd.c
index a3bc37ef..66464360 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -1918,6 +1918,8 @@ int main(int argc, char *argv[])
#ifdef NTPSHM_ENABLE
if (getuid() == 0) {
errno = 0;
+ // nice() can ONLY succeed when run as root!
+ // do not even bother as non-root
if (nice(NICEVAL) != -1 || errno == 0)
gpsd_report (2, "Priority setting failed.\n");
(void)ntpshm_init(&context, nowait);