From 3d3f3123bf43dcf5766a95f3eb93c0b83fea1e5d Mon Sep 17 00:00:00 2001 From: a <1@1.1> Date: Tue, 4 Jun 2024 23:55:41 +0200 Subject: [PATCH] update --- signals-catch.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/signals-catch.py b/signals-catch.py index 9bbb39c..a5aba65 100644 --- a/signals-catch.py +++ b/signals-catch.py @@ -4,6 +4,7 @@ from datetime import datetime ASK_INPUT = True +SLEEP_SEC = 0 OUTPUT_FILE = '/tmp/sig' # Use `tail -f /tmp/sig` to monitor the process. def log(msg, file=sys.stdout): @@ -55,8 +56,8 @@ def signal_handler(signum, frame): sys.exit() else: log(f'sleep {i}') - if echo_sleep: - time.sleep(1) + if SLEEP_SEC: + time.sleep(SLEEP_SEC) i += 1