summaryrefslogtreecommitdiff
path: root/gpsctl.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-02-09 22:51:18 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-02-09 22:51:18 -0500
commitfacc08793683c63cc658d0ae549f3561411f0a08 (patch)
treef22ff00cf1dd2f7df28c325b40b0f0783ecee463 /gpsctl.c
parent5b4af8cc002773058ad744f9c2f9975284b09224 (diff)
downloadgpsd-facc08793683c63cc658d0ae549f3561411f0a08.tar.gz
Implement and document GPSD_SHM_KEY environment variable.
Diffstat (limited to 'gpsctl.c')
-rw-r--r--gpsctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gpsctl.c b/gpsctl.c
index 434be095..1e62cb27 100644
--- a/gpsctl.c
+++ b/gpsctl.c
@@ -296,7 +296,7 @@ int main(int argc, char **argv)
case 'R': /* remove the SHM export segment */
#ifdef SHM_EXPORT_ENABLE
/*@-nullpass@*/
- status = shmget(GPSD_KEY, 0, 0);
+ status = shmget(getenv("GPSD_SHM_KEY") ? atoi(getenv("GPSD_SHM_KEY")) : GPSD_KEY, 0, 0);
if (status == -1) {
gpsd_report(&context.errout, LOG_WARN,
"GPSD SHM segment does not exist.\n");