(fd)
| 9 | GLOBAL_SIGCHLD_RECEIVED = 0 |
| 10 | |
| 11 | def nonblock (fd): |
| 12 | # if O_NDELAY is set read() returns 0 (ambiguous with EOF). |
| 13 | # if O_NONBLOCK is set read() returns -1 and sets errno to EAGAIN |
| 14 | original_flags = fcntl.fcntl (fd, fcntl.F_GETFL, 0) |
| 15 | flags = original_flags | os.O_NONBLOCK |
| 16 | fcntl.fcntl(fd, fcntl.F_SETFL, flags) |
| 17 | return original_flags |
| 18 | |
| 19 | def signal_handler (signum, frame): |
| 20 | print '<HANDLER>' |
no outgoing calls
no test coverage detected
searching dependent graphs…