import errno
import select
import signal
import signalfd
fd = signalfd.init()
while 1:
try:
r, w, x = select.select([fd], [], [])
except select.error as e:
if e.args[0] == errno.EINTR:
continue
raise
if r and signalfd.read() == signal.SIGTERM:
break
-
Notifications
You must be signed in to change notification settings - Fork 0
Robust signal handling for Python
License
ninchat/pysignalfd
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Robust signal handling for Python
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published