From c5d570ddba7b3e95fdade96758df0eb2d24cf42f Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Thu, 23 May 2013 14:44:45 +0200 Subject: [PATCH] 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 --- src/unix/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unix/signal.c b/src/unix/signal.c index f7fd2e5e..22c7783b 100644 --- a/src/unix/signal.c +++ b/src/unix/signal.c @@ -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++;