Activity log for bug #1427434

Date Who What changed Old value New value Message
2015-03-03 00:17:51 Justin Patrin bug added bug
2015-03-03 00:18:17 Justin Patrin description Since the supervisor doesn't block while stopping the init script returns from the stop command before the process dies. The following patch fixes this: diff --git a/debian/supervisor.init b/debian/supervisor.init index 49ed69b..334d4c6 100644 --- a/debian/supervisor.init +++ b/debian/supervisor.init @@ -100,18 +100,10 @@ case "$1" in fi ;; stop) - echo -n "Stopping $DESC: " - if [ -e $PIDFILE ]; then - pid=$(cat $PIDFILE) - fi - start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE - if [ ! -z "$pid" ]; then - while [ -e /prod/$pid ]; do - sleep 1; - done - fi - echo "$NAME." - ;; + echo -n "Stopping $DESC: " + start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE + echo "$NAME." + ;; force-stop) echo -n "Forcefully stopping $DESC: " force_stop Since the supervisor doesn't block while stopping the init script returns from the stop command before the process dies. The following patch fixes this: diff --git a/debian/supervisor.init b/debian/supervisor.init index 49ed69b..334d4c6 100644 --- a/debian/supervisor.init +++ b/debian/supervisor.init @@ -100,18 +100,10 @@ case "$1" in          fi         ;;    stop) - echo -n "Stopping $DESC: " - if [ -e $PIDFILE ]; then - pid=$(cat $PIDFILE) - fi - start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE - if [ ! -z "$pid" ]; then - while [ -e /proc/$pid ]; do - sleep 1; - done - fi - echo "$NAME." - ;; + echo -n "Stopping $DESC: " + start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE + echo "$NAME." + ;;    force-stop)         echo -n "Forcefully stopping $DESC: "          force_stop
2015-03-03 00:18:57 Justin Patrin description Since the supervisor doesn't block while stopping the init script returns from the stop command before the process dies. The following patch fixes this: diff --git a/debian/supervisor.init b/debian/supervisor.init index 49ed69b..334d4c6 100644 --- a/debian/supervisor.init +++ b/debian/supervisor.init @@ -100,18 +100,10 @@ case "$1" in          fi         ;;    stop) - echo -n "Stopping $DESC: " - if [ -e $PIDFILE ]; then - pid=$(cat $PIDFILE) - fi - start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE - if [ ! -z "$pid" ]; then - while [ -e /proc/$pid ]; do - sleep 1; - done - fi - echo "$NAME." - ;; + echo -n "Stopping $DESC: " + start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE + echo "$NAME." + ;;    force-stop)         echo -n "Forcefully stopping $DESC: "          force_stop Since the supervisor doesn't block while stopping the init script returns from the stop command before the process dies. The following patch fixes this: diff --git a/debian/supervisor.init b/debian/supervisor.init index 334d4c6..49ed69b 100644 --- a/debian/supervisor.init +++ b/debian/supervisor.init @@ -100,10 +100,18 @@ case "$1" in fi ;; stop) - echo -n "Stopping $DESC: " - start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE - echo "$NAME." - ;; + echo -n "Stopping $DESC: " + if [ -e $PIDFILE ]; then + pid=$(cat $PIDFILE) + fi + start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE + if [ ! -z "$pid" ]; then + while [ -e /proc/$pid ]; do + sleep 1; + done + fi + echo "$NAME." + ;; force-stop) echo -n "Forcefully stopping $DESC: " force_stop
2018-05-22 15:43:30 Launchpad Janitor supervisor (Ubuntu): status New Confirmed