Subject: bin/3271: apmd is fragile
To: None <gnats-bugs@gnats.netbsd.org>
From: Lennart Augustsson <augustss@cs.chalmers.se>
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
>Last-Modified:
>Originator: Lennart Augustsson
>Organization:
Department of Computing Science, Chalmers University
>Release: NetBSD-current 97-03-28
>Environment:
System: NetBSD calvin.cs.chalmers.se 1.2C NetBSD 1.2C (CALVIN) #109: Sat Mar 1 00:28:08 MET 1997 jessica@calvin.cs.chalmers.se:/usr/src/sys/arch/i386/compile/CALVIN i386
>Description:
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.
>How-To-Repeat:
Connect to apmd and exit.
>Fix:
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);
>Audit-Trail:
>Unformatted: