Close pipe when externremux.sh is gone. Fixes high CPU load problem (#235)

This commit is contained in:
schmirl 2007-04-02 10:35:29 +00:00
parent 525574f9b0
commit 69b754bef9

View File

@ -119,7 +119,15 @@ void cTSExt::Action(void)
if (FD_ISSET(m_Outpipe, &rfds)) { if (FD_ISSET(m_Outpipe, &rfds)) {
int result; int result;
if ((result = m_ResultBuffer->Read(m_Outpipe)) == -1) { if ((result = m_ResultBuffer->Read(m_Outpipe)) == -1) {
if (errno != EINTR) {
LOG_ERROR_STR("read failed"); LOG_ERROR_STR("read failed");
m_Active = false;
}
break;
}
else if (result == 0) {
esyslog("streamdev-server: EOF reading from externremux");
m_Active = false;
break; break;
} }
} }