Explorar o código

fuse_main: return signal number

Thomas Waldmann hai 2 semanas
pai
achega
98cf13a564
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      src/borg/fuse.py

+ 3 - 1
src/borg/fuse.py

@@ -54,8 +54,10 @@ def fuse_main():
     if has_pyfuse3:
         try:
             trio.run(llfuse.main)
+        except KeyboardInterrupt:
+            return SIGINT
         except:  # noqa
-            return 1  # TODO return signal number if it was killed by signal
+            return -1  # avoid colliding with signal numbers
         else:
             return None
     else: