diff options
author | Gary E. Miller <gem@rellim.com> | 2009-12-23 01:14:11 +0000 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2009-12-23 01:14:11 +0000 |
commit | b7164bb35fc60b255cd5c439dbcf5f44d665b90d (patch) | |
tree | c8da2c3b2f2dbe4eaf0bcd3f76c7adbb3171281d | |
parent | 00a660aa1127c19ce6365e42506ee9bc706a1c50 (diff) | |
download | gpsd-b7164bb35fc60b255cd5c439dbcf5f44d665b90d.tar.gz |
Add a good comment that gpsd CAN talk to ntpd as non-root.
-rw-r--r-- | ntpshm.c | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -52,6 +52,20 @@ struct shmTime { int pad[10]; }; +/* Note: you can start gpsd as non-root, and have it work with ntpd + * you MUST start gpsd before ntpd. Confirmed working in SVN 6900. + * + * to debug, try this: + * cat /proc/sysvipc/shm + * + * if you see the shared segments, and no gpsd or ntpd is running then + * try removeing them like this: + * + * ipcrm -M 0x4e545030 + * ipcrm -M 0x4e545031 + * ipcrm -M 0x4e545031 + * ipcrm -M 0x4e545031 + */ static /*@null@*/ struct shmTime *getShmTime(int unit) { int shmid; @@ -68,8 +82,6 @@ static /*@null@*/ struct shmTime *getShmTime(int unit) shmid=shmget ((key_t)(NTPD_BASE+unit), sizeof (struct shmTime), IPC_CREAT|perms); if (shmid == -1) { - // to debug, try this: - // cat /proc/sysvipc/shm gpsd_report(LOG_ERROR, "NTPD shmget(%ld, %ld, %o) fail: %s\n", (long int)(NTPD_BASE+unit),sizeof (struct shmTime), (int)0777, strerror(errno)); gpsd_report(LOG_ERROR, |