[MINOR] add basic signal handling functions

These functions will be used to deliver asynchronous signals in order
to make the signal handling functions more robust. The goal is to keep
the same interface to signal handlers.
diff --git a/include/common/defaults.h b/include/common/defaults.h
index 07cb75f..cdc6b7f 100644
--- a/include/common/defaults.h
+++ b/include/common/defaults.h
@@ -166,4 +166,11 @@
 #define STATS_VERSION_STRING " version " HAPROXY_VERSION ", released " HAPROXY_DATE
 #endif
 
+/* Maximum signal queue size, and also number of different signals we can
+ * handle.
+ */
+#ifndef MAX_SIGNAL
+#define MAX_SIGNAL 256
+#endif
+
 #endif /* _COMMON_DEFAULTS_H */
diff --git a/include/proto/signal.h b/include/proto/signal.h
new file mode 100644
index 0000000..2734827
--- /dev/null
+++ b/include/proto/signal.h
@@ -0,0 +1,29 @@
+/*
+ * Asynchronous signal delivery functions.
+ *
+ * Copyright 2000-2009 Willy Tarreau <w@1wt.eu>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ */
+
+#include <signal.h>
+#include <common/standard.h>
+#include <types/signal.h>
+
+extern int signal_queue_len;
+extern struct signal_descriptor signal_state[];
+
+void signal_init();
+void signal_handler(int sig);
+void signal_register(int sig, void (*handler)(int));
+void __signal_process_queue();
+
+static inline void signal_process_queue()
+{
+	if (unlikely(signal_queue_len > 0))
+		__signal_process_queue();
+}
diff --git a/include/types/signal.h b/include/types/signal.h
new file mode 100644
index 0000000..b863d23
--- /dev/null
+++ b/include/types/signal.h
@@ -0,0 +1,20 @@
+/*
+ * Asynchronous signal delivery functions descriptors.
+ *
+ * Copyright 2000-2009 Willy Tarreau <w@1wt.eu>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ */
+
+#include <signal.h>
+#include <common/config.h>
+#include <common/standard.h>
+
+struct signal_descriptor {
+	int count;  /* number of times raised */
+	void (*handler)(int sig);
+};