]> granicus.if.org Git - libevent/commit
Use kill() over raise() for raising the signal (fixes osx 10.14 with kqueue)
authorAzat Khuzhin <azat@libevent.org>
Sun, 24 Feb 2019 14:07:18 +0000 (17:07 +0300)
committerAzat Khuzhin <azat@libevent.org>
Sun, 24 Feb 2019 14:18:11 +0000 (17:18 +0300)
commit728c5dc11f55b4ba5f518812833eab5a2cc3d550
tree27d1df8168bc8fb55f182ad6538302d7ab632663
parent8d5b14d42888416404a24f8060b514f8258b7f17
Use kill() over raise() for raising the signal (fixes osx 10.14 with kqueue)

On OSX 10.14+ the raise() uses pthread_kill() (verified with dtruss) and
by some reason signals that has been raised with pthread_kill() do not
received by kqueue EVFILT_SIGNAL.

While on OSX 10.11 the raise()/pthread_kill() uses plain kill() and
everything work just fine (linux also does the same, but instead of
kill() it uses tgkill())

Here is a simple reproducer that installs alarm to show that the signal
does not received by the kqueue backend:
  https://gist.github.com/azat/73638b8e3b0fa563a20dadcca9e652a1

Refs: #747
Fixes: #765
test/regress.c