<?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>82859</bug_id>
          
          <creation_ts>2005-02-21 12:11 0000</creation_ts>
          <short_desc>/etc/init.d/ntpd restart tries to kill wrong process</short_desc>
          <delta_ts>2005-08-19 21:09:20 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>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>pwsoft@syntiac.com</reporter>
          <assigned_to>vapier@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>pwsoft@syntiac.com</who>
            <bug_when>2005-02-21 12:11:30 0000</bug_when>
            <thetext>athlon1800 peter # /etc/init.d/ntpd restart
 * Stopping ntpd ...
start-stop-daemon: warning: failed to kill 347: No such process
1 pids were not killed
No process in pidfile `/var/run/ntpd.pid&apos; found running; none killed.
 * Failed to stop ntpd                                                                 [ !! ]
 * Starting ntpd ...                                                                   [ ok ]

Apperently ntpd was no longer running. Looking at the logging might show the reason it is not running.
athlon1800 peter # cat /var/log/ntp.log
21 Feb 19:27:31 ntpd[347]: synchronized to 132.163.4.101, stratum 1
21 Feb 19:27:31 ntpd[347]: time correction of 4079 seconds exceeds sanity limit (1000); set clock manually to the correct UTC time.

Which I find ok, but I don&apos;t like it tries to kill 347 if this is no longer the ntp process. What happens if this pid is used for something else by the time I do a restart?

Reproducible: Didn&apos;t try
Steps to Reproduce:
1. distroy local time
2. wait for ntpd to complain in the log
3. /etc/init.d/ntpd restart

Actual Results:  
See details 

Expected Results:  
ntpd should delete the /var/run/ntpd.pid file when it discovers an error and 
terminates itself (just a guess)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2005-08-19 21:09:20 0000</bug_when>
            <thetext>fixed in cvs</thetext>
          </long_desc>
      
    </bug>

</bugzilla>