changeset 983:f57cc4bfa195 HEAD

DISABLE_ALARMHUP environment: Disable sending SIGHUP every 30 secs. Really annoying with debugging.
author Timo Sirainen <tss@iki.fi>
date Mon, 20 Jan 2003 13:49:29 +0200
parents 4937e278489c
children 907b9845eaa6
files src/lib/alarm-hup.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/alarm-hup.c	Mon Jan 20 03:59:39 2003 +0200
+++ b/src/lib/alarm-hup.c	Mon Jan 20 13:49:29 2003 +0200
@@ -28,6 +28,7 @@
 
 #include <signal.h>
 #include <unistd.h>
+#include <stdlib.h>
 
 static int initialized = FALSE;
 static unsigned int alarm_timeout = 30;
@@ -36,6 +37,9 @@
 {
 	unsigned int old;
 
+	if (getenv("DISABLE_ALARMHUP") != NULL)
+		return 0;
+
 	old = alarm_timeout;
 	alarm_timeout = timeout;
 
@@ -63,6 +67,9 @@
 	struct sigaction act;
 #endif
 
+	if (getenv("DISABLE_ALARMHUP") != NULL)
+		alarm_timeout = 0;
+
 	if (initialized)
 		return;
 	initialized = TRUE;