diff --git a/src/signal_handler.c b/src/signal_handler.c
index a11c85693919151148bc604d73b7a4ea8c846cff..ebce1377df4e4b1f589b277ce32d773c417302eb 100644
--- a/src/signal_handler.c
+++ b/src/signal_handler.c
@@ -22,7 +22,7 @@
 #include "builtin_functions.h"
 #include <signal.h>
 
-RCSID("$Id: signal_handler.c,v 1.68 1998/06/08 12:48:28 grubba Exp $");
+RCSID("$Id: signal_handler.c,v 1.69 1998/06/17 09:05:16 noring Exp $");
 
 #ifdef HAVE_PASSWD_H
 # include <passwd.h>
@@ -367,10 +367,13 @@ static RETSIGTYPE receive_signal(int signum)
 {
   int tmp;
 
-#ifdef DEBUG 
-  if(signum<0 || signum>=MAX_SIGNALS)
-    fatal("Received signal %u >= %u!!!\n", signum, MAX_SIGNALS);
-#endif
+  if ((signum < 0) || (signum >= MAX_SIGNALS)) {
+    /* Some OSs (Solaris 2.6) send a bad signum sometimes.
+     * SIGCHLD is the safest signal to substitute.
+     *	/grubba 1998-05-19
+     */
+    signum = SIGCHLD;
+  }
 
   tmp=firstsig+1;
   if(tmp == SIGNAL_BUFFER) tmp=0;