diff --git a/cli/src/zshell/subcommands/__pycache__/scheme.cpython-314.pyc b/cli/src/zshell/subcommands/__pycache__/scheme.cpython-314.pyc index 010ddf9..e553570 100644 Binary files a/cli/src/zshell/subcommands/__pycache__/scheme.cpython-314.pyc and b/cli/src/zshell/subcommands/__pycache__/scheme.cpython-314.pyc differ diff --git a/cli/src/zshell/subcommands/__pycache__/shell.cpython-314.pyc b/cli/src/zshell/subcommands/__pycache__/shell.cpython-314.pyc index a47f91f..7f6e764 100644 Binary files a/cli/src/zshell/subcommands/__pycache__/shell.cpython-314.pyc and b/cli/src/zshell/subcommands/__pycache__/shell.cpython-314.pyc differ diff --git a/cli/src/zshell/subcommands/shell.py b/cli/src/zshell/subcommands/shell.py index c6a8587..ae73d0b 100644 --- a/cli/src/zshell/subcommands/shell.py +++ b/cli/src/zshell/subcommands/shell.py @@ -1,4 +1,5 @@ import subprocess +import time import typer args = ["qs", "-c", "zshell"] @@ -8,7 +9,7 @@ app = typer.Typer() @app.command() def kill(): - subprocess.run(args + ["kill"], check=True) + subprocess.run(args + ["kill"], check=False) @app.command() @@ -19,6 +20,11 @@ def start(no_daemon: bool = False): @app.command() def restart(no_daemon: bool = False): subprocess.run(args + ["kill"], check=False) + for _ in range(50): + result = subprocess.run(args + ["kill"], capture_output=True) + if result.returncode == 255: + break + time.sleep(0.05) subprocess.run(args + ["-n"] + ([] if no_daemon else ["-d"]), check=True)