Skip to content

Commit fb893cd

Browse files
committed
Small update
1 parent 7d1344c commit fb893cd

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

foxfile.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,8 @@
3434
# Unix SIGPIPE handling (exit cleanly on broken pipe).
3535
if os.name != "nt":
3636
import signal
37-
3837
if hasattr(signal, "SIGPIPE"):
39-
40-
def _sigpipe_handler(signum, frame): # noqa: ARG001
41-
pyfoxfile.VerbosePrintOut("Received SIGPIPE, exiting gracefully.", "info")
42-
raise SystemExit(0)
43-
44-
signal.signal(signal.SIGPIPE, _sigpipe_handler)
38+
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
4539

4640
# Feature flags (re-exported from module; kept for CLI parity)
4741
rarfile_support = pyfoxfile.rarfile_support

pyfoxfile/__main__.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,8 @@
3434
# Unix SIGPIPE handling (exit cleanly on broken pipe).
3535
if os.name != "nt":
3636
import signal
37-
3837
if hasattr(signal, "SIGPIPE"):
39-
40-
def _sigpipe_handler(signum, frame): # noqa: ARG001
41-
pyfoxfile.VerbosePrintOut("Received SIGPIPE, exiting gracefully.", "info")
42-
raise SystemExit(0)
43-
44-
signal.signal(signal.SIGPIPE, _sigpipe_handler)
38+
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
4539

4640
# Feature flags (re-exported from module; kept for CLI parity)
4741
rarfile_support = pyfoxfile.rarfile_support

0 commit comments

Comments
 (0)