vi: don't wait 50 ms before reading ESC sequences

inetd,syslogd: use safe_read instead of open-coded EINTR handling
syslogd: bail out if you see null read from Unix socket
(should never happen, but if it does, spinning forever
and eating 100% CPU is not a good idea)
This commit is contained in:
Denis Vlasenko
2007-10-11 10:10:15 +00:00
parent f9566d8c29
commit 4f95e5aab8
3 changed files with 12 additions and 18 deletions

View File

@@ -1638,8 +1638,7 @@ discard_stream(int s, servtab_t *sep)
inetd_setproctitle(sep->se_service, s);
while (1) {
errno = 0;
if (read(s, buffer, sizeof(buffer)) <= 0 && errno != EINTR)
if (safe_read(s, buffer, sizeof(buffer)) <= 0)
exit(0);
}
}