diff options
author | Michael W. Hudson <mwh@python.net> | 2003-03-13 13:56:53 (GMT) |
---|---|---|
committer | Michael W. Hudson <mwh@python.net> | 2003-03-13 13:56:53 (GMT) |
commit | 43ed43bfc1380d36dd87f405080b5b3fae55532a (patch) | |
tree | a021c5fc5004bf2a4894e9b84f841d764222b424 /Lib | |
parent | 94afd3095ee37dfcc672ebcd6ade8a3b00a39a69 (diff) | |
download | cpython-43ed43bfc1380d36dd87f405080b5b3fae55532a.zip cpython-43ed43bfc1380d36dd87f405080b5b3fae55532a.tar.gz cpython-43ed43bfc1380d36dd87f405080b5b3fae55532a.tar.bz2 |
Take out my (long since disabled) POSIX signal mask handling code.
I'm not going to have the time or energy to get this working x-platform
-- anyone who does is welcome to the code!
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_signal.py | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py index 737f160..c984361 100644 --- a/Lib/test/test_signal.py +++ b/Lib/test/test_signal.py @@ -64,64 +64,3 @@ except KeyboardInterrupt: if verbose: print "KeyboardInterrupt (assume the alarm() went off)" - -if hasattr(signal, "sigprocmask"): - class HupDelivered(Exception): - pass - def hup(signum, frame): - raise HupDelivered - def hup2(signum, frame): - signal.signal(signal.SIGHUP, hup) - return - signal.signal(signal.SIGHUP, hup) - - if verbose: - print "blocking SIGHUP" - - defaultmask = signal.sigprocmask(signal.SIG_BLOCK, [signal.SIGHUP]) - - if verbose: - print "sending SIGHUP" - - try: - os.kill(pid, signal.SIGHUP) - except HupDelivered: - raise TestFailed, "HUP not blocked" - - if signal.SIGHUP not in signal.sigpending(): - raise TestFailed, "HUP not pending" - - if verbose: - print "unblocking SIGHUP" - - try: - signal.sigprocmask(signal.SIG_UNBLOCK, [signal.SIGHUP]) - except HupDelivered: - pass - else: - raise TestFailed, "HUP not delivered" - - if verbose: - print "testing sigsuspend" - - signal.sigprocmask(signal.SIG_BLOCK, [signal.SIGHUP]) - signal.signal(signal.SIGHUP, hup2) - - if not os.fork(): - time.sleep(2) - os.kill(pid, signal.SIGHUP) - time.sleep(2) - os.kill(pid, signal.SIGHUP) - os._exit(0) - else: - try: - signal.sigsuspend(defaultmask) - except: - raise TestFailed, "sigsuspend erroneously raised" - - try: - signal.sigsuspend(defaultmask) - except HupDelivered: - pass - else: - raise TestFailed, "sigsupsend didn't raise" |