diff --git a/py/embedded-server/deephaven_server/cli.py b/py/embedded-server/deephaven_server/cli.py index 192629d8f51..f4e057c38e9 100644 --- a/py/embedded-server/deephaven_server/cli.py +++ b/py/embedded-server/deephaven_server/cli.py @@ -53,9 +53,10 @@ def server(host, port, jvm_args, extra_classpath, default_jvm_args): ) click.echo("Press Control-C to exit") - def signal_handler(sig, frame): + try: + while True: + input() + except KeyboardInterrupt: + # signal_handler should already be called click.echo("Exiting Deephaven...") - sys.exit(0) - - signal.signal(signal.SIGINT, signal_handler) - signal.pause() \ No newline at end of file + sys.exit(0) \ No newline at end of file diff --git a/py/embedded-server/java-runtime/src/main/java/io/deephaven/python/server/EmbeddedServer.java b/py/embedded-server/java-runtime/src/main/java/io/deephaven/python/server/EmbeddedServer.java index da1af8edb3b..a27e33120d6 100644 --- a/py/embedded-server/java-runtime/src/main/java/io/deephaven/python/server/EmbeddedServer.java +++ b/py/embedded-server/java-runtime/src/main/java/io/deephaven/python/server/EmbeddedServer.java @@ -99,6 +99,7 @@ interface Builder extends JettyServerComponent.Builder