From a4e3ca933b036102b1aed623015d007869416c7b Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 19 Oct 2009 00:33:00 -0700 Subject: [PATCH] EINTR is not a fatal write error --- Alc/oss.c | 4 ++-- Alc/solaris.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Alc/oss.c b/Alc/oss.c index fa463e0c..b5adfcbe 100644 --- a/Alc/oss.c +++ b/Alc/oss.c @@ -80,7 +80,7 @@ static ALuint OSSProc(ALvoid *ptr) ALCdevice *pDevice = (ALCdevice*)ptr; oss_data *data = (oss_data*)pDevice->ExtraData; ALint frameSize; - int wrote; + ssize_t wrote; frameSize = aluChannelsFromFormat(pDevice->Format) * aluBytesFromFormat(pDevice->Format); @@ -96,7 +96,7 @@ static ALuint OSSProc(ALvoid *ptr) wrote = write(data->fd, WritePtr, len); if(wrote < 0) { - if(errno != EAGAIN && errno != EWOULDBLOCK) + if(errno != EAGAIN && errno != EWOULDBLOCK && errno != EINTR) { AL_PRINT("write failed: %s\n", strerror(errno)); aluHandleDisconnect(pDevice); diff --git a/Alc/solaris.c b/Alc/solaris.c index 988a91f0..695f8f86 100644 --- a/Alc/solaris.c +++ b/Alc/solaris.c @@ -71,7 +71,7 @@ static ALuint SolarisProc(ALvoid *ptr) wrote = write(data->fd, WritePtr, len); if(wrote < 0) { - if(errno != EAGAIN && errno != EWOULDBLOCK) + if(errno != EAGAIN && errno != EWOULDBLOCK && errno != EINTR) { AL_PRINT("write failed: %s\n", strerror(errno)); aluHandleDisconnect(pDevice); -- 2.11.4.GIT