Skip to content

Commit a30e387

Browse files
committed
signal: Add test for SIG_IGN functionality.
1 parent b35135e commit a30e387

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

signal/example_sigint_ign.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import time
2+
from signal import *
3+
4+
5+
print("org signal() val:", signal(SIGINT, SIG_IGN))
6+
print("read back signal() val:", signal(SIGINT, SIG_IGN))
7+
8+
print("You can't break me - use SIGTERM")
9+
while 1:
10+
time.sleep(1)

0 commit comments

Comments
 (0)