Package: supervisor
Version: 4.2.5-1
Followup-For: Bug #877086
X-Debbugs-Cc: [email protected]

Dear Maintainer,

   * What led up to the situation?

Attempting to restart the Supervisor service using the SysV init script 
(/etc/init.d/supervisor restart) on Debian Bookworm, as part of routine 
maintenance (eg : Docker context).

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

Executed /etc/init.d/supervisor restart, which stopped the daemon but failed to 
restart it due to missing start invocation in the restart() function.

   * What was the outcome of this action?

Supervisor daemon stopped (no process via ps aux | grep supervisord), leaving 
managed processes down until manual start.

   * What outcome did you expect instead?

Daemon to stop gracefully and then restart automatically, restoring all managed 
processes.


The restart() function in debian/supervisor.init only stops the service via 
start-stop-daemon --stop but lacks a subsequent start call, leaving it stopped. 
This is a known longstanding issue (bug #877086).
Attached is a DEP-3 formatted patch (v5) that:

Changes the echo message to "Stopping $DESC: " for clarity.
Inserts $0 start after the post-stop echo, with exact tab indentation matching 
the original.

Tested on Debian Bookworm: After applying and rebuilding/installing the .deb, 
restart now stops, echoes "supervisor.", then calls start() successfully.
Please apply this patch and close #877086.

Thanks.


-- System Information:
Debian Release: 12.12
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'oldstable-security'), (500, 
'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.11.11-linuxkit (SMP w/5 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to fr_FR.UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect

Versions of packages supervisor depends on:
ii  init-system-helpers        1.65.2+deb12u1
ii  python3                    3.11.2-1+b1
ii  python3-pkg-resources      66.1.1-1+deb12u2
ii  sysvinit-utils [lsb-base]  3.06-4

supervisor recommends no packages.

Versions of packages supervisor suggests:
pn  supervisor-doc  <none>

-- no debconf information
Description: Fix restart function in SysV init script to actually restart after 
stop.
 The restart() function only stops the service but does not start it again,
 leaving supervisor stopped. This patch changes the initial message to 
"Stopping"
 for clarity, keeps the post-stop echo, and adds a call to $0 start after the 
stop
 to invoke the start function.
 .
 This addresses the longstanding issue where /etc/init.d/supervisor restart
 fails to restart the daemon.
 .
 SysV is still useful in a Docker context.
Origin: Debian
Author: Denis Roussel <[email protected]>
Bug-Debian: https://bugs.debian.org/877086
Forwarded: not-needed
Last-Update: 2025-11-19
---
--- a/debian/supervisor.init
+++ b/debian/supervisor.init
@@ -108,9 +108,10 @@    && $0 restart \
        || exit 0
        ;;
   restart)
-    echo -n "Restarting $DESC: "
+    echo -n "Stopping $DESC: "
     start-stop-daemon --stop --retry=$RETRY --quiet --oknodo --pidfile $PIDFILE
        echo "$NAME."
+       $0 start
        ;;
   status)
     echo -n "$NAME is "

Reply via email to