unix: fix assert on signal pipe overflow

An incorrect assert() statement was causing libuv to crash when writing
to an internal signal pipe would result in EAGAIN/EWOULDBLOCK.

This commit doesn't solve the underlying issue that the signal pipe can
overflow.

This should fix joyent/node#5538
This commit is contained in:
Bert Belder 2013-05-23 14:44:45 +02:00
parent c53fe81544
commit c5d570ddba

View File

@ -160,7 +160,7 @@ static void uv__signal_handler(int signum) {
} while (r == -1 && errno == EINTR);
assert(r == sizeof msg ||
(r == -1 && errno != EAGAIN && errno != EWOULDBLOCK));
(r == -1 && (errno == EAGAIN || errno == EWOULDBLOCK)));
if (r != -1)
handle->caught_signals++;