From d91b7645bd72a328d4cb404f38dad9eb1577960e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 11 Mar 2026 16:19:47 +0530 Subject: [PATCH] Fix #2143888 [calibre-debug --shutdown-running-calibre returns error code](https://bugs.launchpad.net/calibre/+bug/2143888) --- src/calibre/gui2/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/main.py b/src/calibre/gui2/main.py index 5d6ba84ad0..ed7d9b3086 100644 --- a/src/calibre/gui2/main.py +++ b/src/calibre/gui2/main.py @@ -468,7 +468,8 @@ def send_message(msg): time.sleep(0.05) with SingleInstance(singleinstance_name) as si: if si: - raise SystemExit(_('Other instance of calibre shutdown')) + print(_('Other instance of calibre shutdown'), file=sys.stderr) + raise SystemExit(0) print(_('Failed to contact running instance of calibre'), file=sys.stderr, flush=True) print(fail_err, file=sys.stderr, flush=True)