<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>61660</bug_id>
          
          <creation_ts>2004-08-25 10:48 0000</creation_ts>
          <short_desc>PID error when stopping or restarting the openntp service</short_desc>
          <delta_ts>2004-08-25 17:52:58 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Applications</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>lars.geiger@gmx.net</reporter>
          <assigned_to>vapier@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>lars.geiger@gmx.net</who>
            <bug_when>2004-08-25 10:48:58 0000</bug_when>
            <thetext>When openntpd starts, it creates two processes, one running as root, one as user ntp:

eden ~ &gt; ps aux | grep ntp
root      3673  0.0  0.2  2600 1072 ?        S    19:40   0:00 /usr/sbin/ntpd
ntp       3674  0.0  0.2  2600 1132 ?        S    19:40   0:00 /usr/sbin/ntpd

When stopping openntp, the initscript tries to stop all instances of ntpd:
&apos;start-stop-daemon --stop --name ntpd&apos;

But the process running as user ntp is killed automatically when the process of root is killed. That is why start-stop-daemon can&apos;t kill the second process.

Reproducible: Always
Steps to Reproduce:
1. Run &apos;/etc/init.d/openntpd stop&apos;
Actual Results:  
eden ~ &gt; /etc/init.d/openntpd stop
 * Stopping ntpd...
start-stop-daemon: warning: failed to kill 3673: No such process
1 pids were not killed

Expected Results:  
eden ~ &gt; /etc/init.d/openntpd stop
 * Stopping ntpd...                           [ ok ]

eden ~ &gt; emerge info
Portage 2.0.50-r10 (default-x86-2004.2, gcc-3.3.3, glibc-2.3.3.20040420-r1,
2.6.8.1-eden1)
=================================================================
System uname: 2.6.8.1-eden1 i686 VIA Nehemiah
Gentoo Base System version 1.4.16
distcc 2.17 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS=&quot;x86&quot;
AUTOCLEAN=&quot;yes&quot;
CFLAGS=&quot;-march=i686 -mcpu=i686 -Os -msse -mmmx -mfpmath=sse -pipe
-fomit-frame-pointer&quot;
CHOST=&quot;i686-pc-linux-gnu&quot;
COMPILER=&quot;&quot;
CONFIG_PROTECT=&quot;/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/qmail/control&quot;
CONFIG_PROTECT_MASK=&quot;/etc/gconf /etc/terminfo /etc/env.d&quot;
CXXFLAGS=&quot;-march=i686 -mcpu=i686 -Os -msse -mmmx -mfpmath=sse -pipe
-fomit-frame-pointer&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoaddcvs buildpkg ccache digest sandbox userpriv usersandbox&quot;
GENTOO_MIRRORS=&quot;ftp://ftp.tu-clausthal.de/pub/linux/gentoo/&quot;
MAKEOPTS=&quot;-j2&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;/usr/local/portage&quot;
SYNC=&quot;rsync://rsync.de.gentoo.org/gentoo-portage&quot;
USE=&quot;acpi acpi4linux apache2 berkdb cle266 crypt dvd ethereal fbcon freetype gd
gtk2 hardenedphp idea imap jpeg libwww maildir md5sum mmx mpi mysql ncurses nls
pam perl png python readline samba sasl slang sse ssl tiff truetype usb x86 xml
xml2 zlib&quot;</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>lars.geiger@gmx.net</who>
            <bug_when>2004-08-25 11:02:43 0000</bug_when>
            <thetext>Created an attachment (id=38186)
Patch for the openntp initscript

Fixes the problem by killing only the process running as root. Also removes an
unnecessary &apos;rm -f /var/run/ntpd.pid&apos;, which is not created by the initscript
nor openntpd itself.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2004-08-25 17:52:58 0000</bug_when>
            <thetext>added to portage, thanks</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>38186</attachid>
            <date>2004-08-25 11:02 0000</date>
            <desc>Patch for the openntp initscript</desc>
            <filename>openntp.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIC9ldGMvaW5pdC5kL29wZW5udHBkLm9sZAkyMDA0LTA4LTI1IDE5OjMzOjMwLjA3MTUyOTU2
MCArMDIwMAorKysgL2V0Yy9pbml0LmQvb3Blbm50cGQJMjAwNC0wOC0yNSAxOTo1MDowMy42Mjk0
ODU3OTIgKzAyMDAKQEAgLTM1LDcgKzM1LDYgQEAKIAogc3RvcCgpIHsKIAllYmVnaW4gIlN0b3Bw
aW5nIG50cGQiCi0Jc3RhcnQtc3RvcC1kYWVtb24gLS1zdG9wIC0tbmFtZSBudHBkCisJc3RhcnQt
c3RvcC1kYWVtb24gLS1zdG9wIC0tbmFtZSBudHBkIC0tdXNlciByb290CiAJZWVuZCAkPyAiRmFp
bGVkIHRvIHN0b3Agb3Blbm50cGQiCi0Jcm0gLWYgL3Zhci9ydW4vbnRwZC5waWQKIH0K
</data>        

          </attachment>
    </bug>

</bugzilla>