summaryrefslogtreecommitdiff
path: root/cgps.c
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 /cgps.c
parentde288ca97fb05f9e77c89134665bb4cd902b96dd (diff)
downloadgpsd-a5f12a958510a08165a8ca38c76eb6b19ad60e6f.tar.gz
Make sure cgps terminates on SIGHUP. Document this.
Diffstat (limited to 'cgps.c')
-rw-r--r--cgps.c2
1 files changed, 2 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);