diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-10-11 14:10:15 +0400 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-10-11 14:10:15 +0400 |
commit | 4f95e5aab8d6a2d827d3fe937cf2c72229f6955e (patch) | |
tree | 3985763ee17b6bb2a75c0143f61dc21f1384cf02 /networking/inetd.c | |
parent | f9566d8c29a820e94f194a9ac303c912899e6c8a (diff) |
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)
Diffstat (limited to 'networking/inetd.c')
-rw-r--r-- | networking/inetd.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/networking/inetd.c b/networking/inetd.c index 9ea7f9cc1..8dca8fc3c 100644 --- a/networking/inetd.c +++ b/networking/inetd.c @@ -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); } } |