Subject: bin/3271: apmd is fragile
To: None <>
From: Lennart Augustsson <>
List: netbsd-bugs
Date: 03/01/1997 18:02:10
>Number:         3271
>Category:       bin
>Synopsis:       apmd is fragile
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar  1 09:20:01 1997
>Originator:     Lennart Augustsson
Department of Computing Science, Chalmers University
>Release:        NetBSD-current 97-03-28
System: NetBSD 1.2C NetBSD 1.2C (CALVIN) #109: Sat Mar 1 00:28:08 MET 1997 i386

	If a client connects to apmd and sends it a request, but dies
	before it does a recv() apmd will recieve a SIGPIPE and die.
	Connect to apmd and exit.
	Have apmd ignore SIGPIPE.

*** apmd.c.old	Sat Mar  1 02:15:37 1997
--- apmd.c	Sat Mar  1 17:57:38 1997
*** 397,402 ****
--- 397,403 ----
      (void) signal(SIGTERM, sigexit);
      (void) signal(SIGHUP, sigexit);
      (void) signal(SIGINT, sigexit);
+     (void) signal(SIGPIPE, SIG_IGN);
      sock_fd = bind_socket(sockname, mode, uid, gid);