Browse code

SIGPIPE is ignored now; under some unclear circumstances, use of exec raised the signal, which then terminated ser; I'm not aware of any SIGPIPE customers, so it should be ok

Jiri Kuthan authored on 05/01/2003 23:28:55
Showing 1 changed files
... ...
@@ -440,14 +440,21 @@ void handle_sigs()
440 440
 
441 441
 	switch(sig_flag){
442 442
 		case 0: break; /* do nothing*/
443
-		case SIGINT:
444 443
 		case SIGPIPE:
444
+				/* SIGPIPE might be rarely received on use of
445
+				   exec module; simply ignore it
446
+				 */
447
+				LOG(L_WARN, "WARNING: SIGPIPE received and ignored\n");
448
+				break;
449
+		case SIGINT:
445 450
 		case SIGTERM:
446 451
 			/* we end the program in all these cases */
447 452
 			if (sig_flag==SIGINT)
448 453
 				DBG("INT received, program terminates\n");
449
-			else if (sig_flag==SIGPIPE)
454
+#ifdef OBSOLETED
455
+			else if (sig_flag==SIGPIPE) 
450 456
 				DBG("SIGPIPE received, program terminates\n");
457
+#endif
451 458
 			else
452 459
 				DBG("SIGTERM received, program terminates\n");
453 460