kill is unsafe respect to signals - any alternativ

2019-08-31 12:48发布

问题:

I read that kill is unsafe respect to signals here.

What else should I use if I want to kill child process as part of clean up inside my signal handler? What are my alternatives?

回答1:

You've misread, that page says that kill() (and everything else in the table) shall be async-signal-safe. anything not in the table is to be considered unsafe.