diff options
author | Björn-Egil Dahlberg <[email protected]> | 2017-03-14 09:55:27 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2017-03-14 09:55:27 +0100 |
commit | aec471e80bf086ae556c9c9b442c3d6cc864c6c8 (patch) | |
tree | 3e9ec2e3eb478d51e6fe2e6b97e1ed0465417a95 /erts/emulator/sys/unix | |
parent | 5d95b5ce9eb08f2087443c1be8de8044552daecc (diff) | |
download | otp-aec471e80bf086ae556c9c9b442c3d6cc864c6c8.tar.gz otp-aec471e80bf086ae556c9c9b442c3d6cc864c6c8.tar.bz2 otp-aec471e80bf086ae556c9c9b442c3d6cc864c6c8.zip |
erts: Fix signal pipe
Diffstat (limited to 'erts/emulator/sys/unix')
-rw-r--r-- | erts/emulator/sys/unix/sys.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/sys/unix/sys.c b/erts/emulator/sys/unix/sys.c index 0d1ed17449..e836f9bcc8 100644 --- a/erts/emulator/sys/unix/sys.c +++ b/erts/emulator/sys/unix/sys.c @@ -1274,8 +1274,8 @@ signal_dispatcher_thread_func(void *unused) do { res = read(sig_notify_fds[0], (void *) &sb.buf[i], sizeof(int) - i); - i += res; - } while ((i != sizeof(int) && res >= 0) || (res < 0 && errno == EINTR)); + i += res > 0 ? res : 0; + } while ((i < sizeof(int) && res >= 0) || (res < 0 && errno == EINTR)); if (res < 0) { erts_exit(ERTS_ABORT_EXIT, |