summaryrefslogtreecommitdiffstats
path: root/maildrop/globaltimer.C
diff options
context:
space:
mode:
Diffstat (limited to 'maildrop/globaltimer.C')
-rw-r--r--maildrop/globaltimer.C33
1 files changed, 33 insertions, 0 deletions
diff --git a/maildrop/globaltimer.C b/maildrop/globaltimer.C
new file mode 100644
index 0000000..2223383
--- /dev/null
+++ b/maildrop/globaltimer.C
@@ -0,0 +1,33 @@
+#include "config.h"
+/*
+** Copyright 1998 - 2006 Double Precision, Inc.
+** See COPYING for distribution information.
+*/
+
+#include "globaltimer.h"
+#include "exittrap.h"
+#include <sysexits.h>
+#include <stdlib.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+
+GlobalTimer::GlobalTimer()
+{
+}
+
+GlobalTimer::~GlobalTimer()
+{
+}
+
+static const char msg[]="maildrop: Timeout quota exceeded.\n";
+
+void GlobalTimer::handler()
+{
+ ExitTrap::onexit();
+ if (write(2, msg, sizeof(msg)-1) < 0)
+ ; /* ignored */
+
+ _exit(EX_TEMPFAIL);
+}