test_poll: test for closing a polled IO in sighandler