--- speckeysd/speckeysd.c	Fri Mar  9 21:20:34 2001
+++ speckeysd-azz/speckeysd.c	Fri Mar  9 20:50:27 2001
@@ -4,6 +4,7 @@
 #include <string.h>
 
 #include <unistd.h>
+#include <sys/wait.h>
 
 #include <X11/X.h>
 #include <X11/Xlib.h>
@@ -23,6 +24,16 @@
 void keypress(XEvent *);
 void read_hot_key_file(char *);
 
+void
+sigchld_handler()
+{
+	/* Wait for the child to exit, preventing zombies. */
+	wait(NULL);
+
+	/* Reset the signal handler. */
+	signal(SIGCHLD, sigchld_handler);
+}
+
 int
 main(int argc, char *argv[])
 {
@@ -36,9 +47,8 @@
 		panic("can't open display.");
 	
 	/* Set up signal handlers. */
-	signal(SIGTERM, SIG_IGN);
-	signal(SIGINT, SIG_IGN);
 	signal(SIGHUP, SIG_IGN);
+	signal(SIGCHLD, sigchld_handler);
 	
 	screen_count = ScreenCount(dpy);
 	
