From owner-freebsd-bugs Mon Sep 17 20:50: 8 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 58A5637B40B for ; Mon, 17 Sep 2001 20:50:00 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f8I3o0k36303; Mon, 17 Sep 2001 20:50:00 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id D1C3937B40B for ; 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 To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: bin/30640: apmd does not terminate properly on SIGTERM Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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