From: Ben Pfaff Date: Wed, 15 Jun 2011 23:39:49 +0000 (-0700) Subject: xenserver: Don't delete pidfile in stop_daemon. X-Git-Tag: v1.2.0~176 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=214301739c8a05a5c206a1781d0922d9ca781dcc;p=sliver-openvswitch.git xenserver: Don't delete pidfile in stop_daemon. 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. --- diff --git a/xenserver/etc_init.d_openvswitch b/xenserver/etc_init.d_openvswitch index 6917fba85..9d5577ee4 100755 --- a/xenserver/etc_init.d_openvswitch +++ b/xenserver/etc_init.d_openvswitch @@ -262,7 +262,6 @@ function stop_daemon { break fi done - rm -f "$pidfile" fi }