diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2005-04-03 06:19:40 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2005-04-03 06:19:40 +0000 |
commit | b5dc263522dc5189652cd52f639211863478c1e5 (patch) | |
tree | 984297b71ec0ff525ebbf3fa1be1de8f493aec98 /gpsfake | |
parent | 589841652d36f82a657da34e7fee54d81ebe2ae8 (diff) | |
download | gpsd-b5dc263522dc5189652cd52f639211863478c1e5.tar.gz |
Device list editing through a separate control socket.
Diffstat (limited to 'gpsfake')
-rwxr-xr-x | gpsfake | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -35,9 +35,11 @@ except: sys.exit(1) slave = os.ttyname(slave_fd) -spawncmd = "gpsd -N -P /tmp/gpsfake%d -f %s %s" % (os.getpid(),slave,doptions) +spawncmd = "gpsd -N -P %s -f %s %s" % (pidfile, slave, doptions) spawncmd = spawncmd.strip() +pidfile = "/tmp/gpsfake_pid-%s" % os.getpid() + if not spawn: raw_input("gpsfake: launch '%s' and press enter..." % spawncmd) elif os.system(spawncmd + " &"): @@ -46,7 +48,7 @@ elif os.system(spawncmd + " &"): else: sys.stderr.write("gpsfake: '%s' launch OK.\n" % spawncmd) - fp = open("/tmp/gpsfake%s" % os.getpid()) + fp = open(pidfile) pid = int(fp.read()) fp.close() os.remove("/tmp/gpsfake%s" % os.getpid()) |