]> glassweightruler.freedombox.rocks Git - waydroid.git/commitdiff
lxc: Handle CTRL+C silently during shell commands
authorAlessandro Astone <ales.astone@gmail.com>
Thu, 13 Feb 2025 23:00:47 +0000 (00:00 +0100)
committerAlessandro Astone <ales.astone@gmail.com>
Thu, 13 Feb 2025 23:00:55 +0000 (00:00 +0100)
tools/helpers/lxc.py

index 3a8edf89333485facab0432ff213e06bbdd6561b..bdd2403567e3cec945cbc189cb6b0dc99f4528d9 100644 (file)
@@ -472,7 +472,12 @@ def shell(args):
         command.extend(args.COMMAND)
     else:
         command.append("/system/bin/sh")
-    subprocess.run(command)
+
+    try:
+        subprocess.run(command)
+    except KeyboardInterrupt:
+        pass
+
     if state == "FROZEN":
         freeze(args)