Received: (at submit) by bugs.debian.org; 8 Jun 2001 01:21:14 +0000 From dginsburg@mail.ru Thu Jun 07 20:21:14 2001 Return-path: Received: from gnome01.sovam.com [::ffff:194.67.1.179] by master.debian.org with esmtp (Exim 3.12 1 (Debian)) id 158AxZ-0008NC-00; Thu, 07 Jun 2001 20:21:09 -0500 Received: from ts16-a163.dial.sovam.com ([195.239.3.163]:41483 "EHLO rain" ident: "NO-IDENT-SERVICE[2]" whoson: "dbg@online.ru" smtp-auth: TLS-CIPHER: TLS-PEER: ) by gnome01.sovam.com with ESMTP id ; Fri, 8 Jun 2001 05:20:18 +0400 Received: from dg by rain with local (Exim 3.22 #1 (Debian)) id 158Awi-0000XZ-00; Fri, 08 Jun 2001 05:20:16 +0400 Date: Fri, 8 Jun 2001 05:20:15 +0400 From: Daniel Ginsburg To: Debian Bug Tracking System Subject: pppd fails to terminate while executing connect script Message-ID: <20010608052015.A1788@rain> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.3.18i X-Reportbug-Version: 1.17 Sender: Daniel Ginsburg Delivered-To: submit@bugs.debian.org Package: ppp Version: 2.4.1-1 Severity: normal Tags: patch sid If options 'persist' and 'holdoff 0' are set ppp fails to terminate on SIGTERM. It only kills connect script, restarts it immediately and continue running. When connection established pppd terminates ok on SIGTERM/SIGINT. The nature of problem is pppd's SIGTERM/SIGINT handler sets flag but fails to check it in main loop when no connection established yet and holdoff period is 0. The fix is one line. Corrected debian/patches/017_main.c.diff: --- ppp-2.4.1.orig/pppd/main.c Tue Mar 13 08:56:19 2001 +++ ppp-2.4.1/pppd/main.c Fri Jun 8 00:25:46 2001 @@ -548,6 +548,7 @@ pidfilename[0] = 0; } + handle_events(); if (!persist || (maxfail > 0 && unsuccess >= maxfail)) break; @@ -1778,7 +1779,8 @@ dbuf.dsize = vlen; if (tdb_store(pppdb, key, dbuf, TDB_REPLACE)) error("tdb_store failed: %s", tdb_error(pppdb)); - + free(vbuf); + } /* -- System Information Debian Release: testing/unstable Architecture: i386 Kernel: Linux rain 2.4.1 #1 ðÎÄ íÁÒ 19 21:34:46 MSK 2001 i586 Locale: LANG=ru_RU.KOI8-R, LC_CTYPE=ru_RU.KOI8-R Versions of packages ppp depends on: ii libc6 2.2.3-5 GNU C Library: Shared libraries an ii libpam-modules 0.72-24 Pluggable Authentication Modules f ii libpam0g 0.72-24 Pluggable Authentication Modules l ii netbase 4.05 Basic TCP/IP networking system ii sysvinit 2.78-4 System-V like init. -- dg