diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2005-06-21 20:04:09 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2005-06-21 20:04:09 +0000 |
commit | 19166483e84c34914eca4ac1b1bcfd6fc58ec8b6 (patch) | |
tree | ae7d5ba9446493dcee3d411abbcc8ef6a5a90b32 | |
parent | c00627a00f593b10efbbb60b2e17ed13ee758402 (diff) | |
download | gpsd-19166483e84c34914eca4ac1b1bcfd6fc58ec8b6.tar.gz |
Abolish -n option.
Shortly we're gaing to make it possible to run the daemon under
debugger control.
-rwxr-xr-x | gpsfake | 17 | ||||
-rw-r--r-- | gpsfake.xml | 5 |
2 files changed, 11 insertions, 11 deletions
@@ -220,15 +220,20 @@ if child: os.kill(child, signal.SIGTERM) sys.exit(1) else: - # Child side - time.sleep(1) # Time for pidfile to get written. + # Child side -- wait for daemon to make pidfile so we know it's running + while True: + try: + fp = open(pidfile) + except IOError: + time.sleep(1) + continue + pid = int(fp.read()) + fp.close() + os.remove(pidfile) + break if not pipe or verbose: sys.stderr.write("gpsfake: '%s' launch OK.\n" % spawncmd) - fp = open(pidfile) - pid = int(fp.read()) - fp.close() - os.remove(pidfile) try: if pipe: baton = Baton("Processing %s" % digest.logfile, "done") diff --git a/gpsfake.xml b/gpsfake.xml index 3369925a..88623f77 100644 --- a/gpsfake.xml +++ b/gpsfake.xml @@ -19,7 +19,6 @@ <arg choice='opt'>-h</arg> <arg choice='opt'>-c <replaceable>interval</replaceable></arg> <arg choice='opt'>-l</arg> - <arg choice='opt'>-n</arg> <arg choice='opt'>-o <replaceable>options</replaceable></arg> <arg choice='opt'>-p</arg> <arg choice='opt'>-s <replaceable>speed</replaceable></arg> @@ -59,10 +58,6 @@ seconds. Fractional values of seconds are legal.</para> before each sentence is fed to the daemon. If the sentence is textual (e.g. NMEA, the text is dumped as well).</para> -<para>The -n option suppresses launch of the daemon. Instead, -<application>gpsfake</application> will tell you the name of the slave -pty so you can launch in instance that reads it.</para> - <para>The -o option specifies options to pass to the daemon. Passing "-n -D 4" is often useful.</para> |