From nobody@FreeBSD.org  Mon Sep 17 20:48:21 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id D1C3937B40B
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 17 Sep 2001 20:48:21 -0700 (PDT)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.4/8.11.4) id f8I3mLt36154;
	Mon, 17 Sep 2001 20:48:21 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200109180348.f8I3mLt36154@freefall.freebsd.org>
Date: Mon, 17 Sep 2001 20:48:21 -0700 (PDT)
From: Ralf Meyer <meyerr@magellan.umontreal.ca>
To: freebsd-gnats-submit@FreeBSD.org
Subject: apmd does not terminate properly on SIGTERM
X-Send-Pr-Version: www-1.0

>Number:         30640
>Category:       bin
>Synopsis:       apmd does not terminate properly on SIGTERM
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    murray
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 17 20:50:00 PDT 2001
>Closed-Date:    Sat Jun 21 23:01:39 PDT 2003
>Last-Modified:  Sat Jun 21 23:01:39 PDT 2003
>Originator:     Ralf Meyer
>Release:        4.x-STABLE
>Organization:
Universit de Montral
>Environment:
FreeBSD freyja.asgard 4.4-RC FreeBSD 4.4-RC #0: Mon Aug 20 21:43:14 EDT 2001     root@freyja.asgard:/usr/obj/usr/src/sys/FREYJA  i386
>Description:
Despite of writing "going down on signal 15" apmd does not terminate when receiving 
SIGTERM.
IMHO the problem is caused by the fact that sig_proc() returns 1 if a SIGTERM was 
received. However, event_loop() terminates apmd only if sig_proc returns a negative
value.
>How-To-Repeat:
kill -15 `cat /var/log/apmd.pid`

>Fix:
*** apmd.c      Mon Sep 17 23:46:58 2001
--- apmd.c.ori  Mon Aug 20 18:39:50 2001
***************
*** 478,480 ****
                        syslog(LOG_NOTICE, "going down on signal %d", sig);
!                       rc = -1;
                        goto out;
--- 478,480 ----
                        syslog(LOG_NOTICE, "going down on signal %d", sig);
!                       rc = 1;
                        goto out;

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->murray 
Responsible-Changed-By: murray 
Responsible-Changed-When: Sun May 11 13:56:02 PDT 2003 
Responsible-Changed-Why:  
I'll take a look at this. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=30640 
State-Changed-From-To: open->closed 
State-Changed-By: mdodd 
State-Changed-When: Sat Jun 21 23:01:21 PDT 2003 
State-Changed-Why:  
Committed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=30640 
>Unformatted:
