uvloop icon indicating copy to clipboard operation
uvloop copied to clipboard

uvloop simply disable SIGCHLD?

Open ZhuYuJin opened this issue 4 years ago • 1 comments

  • uvloop version: 0.14.0
  • Python version: 3.6.8
  • Platform: linux
  • Can you reproduce the bug with PYTHONASYNCIODEBUG in env?:
  • Does uvloop behave differently from vanilla asyncio? How?: uvloop cannot add SIGCHLD handler

I need to monitor child process exit.

loop.add_signal_handler(signal.SIGCHLD, handle_child_exit)

However, uvloop simply disable the signal with the following error. RuntimeError: cannot add a signal handler for SIGCHLD: it is used by the event loop to track subprocesses

Is there any solution to support SIGCHLD?

ZhuYuJin avatar Apr 20 '21 08:04 ZhuYuJin

Not right now, but doable in principle. We just need to allow users to provide a handler for SIGCHLD while making sure that libuv receives it too.

1st1 avatar Aug 12 '21 17:08 1st1