Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Sep 2001 20:48:21 -0700 (PDT)
From:      Ralf Meyer <meyerr@magellan.umontreal.ca>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/30640: apmd does not terminate properly on SIGTERM
Message-ID:  <200109180348.f8I3mLt36154@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         30640
>Category:       bin
>Synopsis:       apmd does not terminate properly on SIGTERM
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 17 20:50:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Ralf Meyer
>Release:        4.x-STABLE
>Organization:
Université de Montréal
>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:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200109180348.f8I3mLt36154>