summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2005-08-18 22:05:56 +0000
committerEric S. Raymond <esr@thyrsus.com>2005-08-18 22:05:56 +0000
commita5f12a958510a08165a8ca38c76eb6b19ad60e6f (patch)
tree06c5d5a0dff367486a28cb224acf28961fc79cad
parentde288ca97fb05f9e77c89134665bb4cd902b96dd (diff)
downloadgpsd-a5f12a958510a08165a8ca38c76eb6b19ad60e6f.tar.gz
Make sure cgps terminates on SIGHUP. Document this.
-rw-r--r--cgps.c2
-rw-r--r--xgps.13
-rw-r--r--xgps.xml4
3 files changed, 9 insertions, 0 deletions
diff --git a/cgps.c b/cgps.c
index 5626f07f..772407c6 100644
--- a/cgps.c
+++ b/cgps.c
@@ -57,6 +57,7 @@ static void die(int sig UNUSED)
{
/* Ignore signals. */
(void)signal(SIGINT,SIG_IGN);
+ (void)signal(SIGHUP,SIG_IGN);
/* Move the cursor to the bottom left corner. */
(void)mvcur(0,COLS-1,LINES-1,0);
@@ -349,6 +350,7 @@ int main(int argc, char *argv[])
(void)noecho();
(void)nodelay(stdscr,(bool)TRUE);
(void)signal(SIGINT,die);
+ (void)signal(SIGHUP,die);
/* Here's where updates go. */
gps_set_raw_hook(gpsdata, update_panel);
diff --git a/xgps.1 b/xgps.1
index d89f1594..a31267db 100644
--- a/xgps.1
+++ b/xgps.1
@@ -95,6 +95,9 @@ Rather than use X resources to detemine which units to use, cgps looks at variab
POSIX = miles/feet
[other] = km/meters
+.PP
+cgps terminates when you send it a SIGHUP or SIGINT; given default terminal settings this will happen when you type Ctl\-C at it\&. It will also terminate on 'q'
+
.SH "SEE ALSO"
.PP
diff --git a/xgps.xml b/xgps.xml
index 140a4d5a..7f7327f6 100644
--- a/xgps.xml
+++ b/xgps.xml
@@ -142,6 +142,10 @@ Here are the variables and values it checks:</para>
[other] = km/meters
</screen>
+<para><application>cgps</application> terminates when you send it a
+SIGHUP or SIGINT; given default terminal settings this will happen
+when you type Ctl-C at it. It will also terminate on 'q'</para>
+
</refsect2>
</refsect1>
<refsect1 id='see_also'><title>SEE ALSO</title>