xenserver: Don't delete pidfile in stop_daemon.
authorBen Pfaff <blp@nicira.com>
Wed, 15 Jun 2011 23:39:49 +0000 (16:39 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 28 Jul 2011 18:21:57 +0000 (11:21 -0700)
Deleting the pidfile introduces a minor race: if some other process is
starting a daemon at the same time that the init script is stopping the
same daemon, then this could delete the new daemon's pidfile.

This is really a theoretical risk, because no one should be starting and
stopping a single daemon at the same time.

xenserver/etc_init.d_openvswitch

index dfd8c39..3aacb57 100755 (executable)
@@ -262,7 +262,6 @@ function stop_daemon {
                 break
             fi
         done
-        rm -f "$pidfile"
     fi
 }