Hacker News new | ask | show | jobs
by badmintonbaseba 561 days ago
I'm not seeing python creating a self-pipe for `loop.add_signal_handler`.

edit: Oh, it uses `signal.set_wakeup_fd`, interesting.

https://docs.python.org/3/library/signal.html#signal.set_wak...

edit2: it looks like the fd comes from a self-socket, but yeah, it's the same approach. The function is even called `_make_self_pipe`.

https://github.com/python/cpython/blob/bf21e2160d1dc6869fb23...