FreeBSD Bugzilla – Attachment 14182 Details for
Bug 26665
[PATCH] syslogd hangs when logging from remote hosts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.28 KB, created by
ajk
on 2001-04-18 06:40:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
ajk
Created:
2001-04-18 06:40:01 UTC
Size:
1.28 KB
patch
obsolete
>--- res_send.c.orig Wed Sep 20 16:37:01 2000 >+++ res_send.c Tue Apr 17 23:53:42 2001 >@@ -597,6 +597,8 @@ > */ > struct kevent kv; > struct timespec timeout; >+ struct timeval timeout_tv; >+ struct timeval target; > struct sockaddr_storage from; > int fromlen; > >@@ -706,6 +708,10 @@ > if ((long) timeout.tv_sec <= 0) > timeout.tv_sec = 1; > timeout.tv_nsec = 0; >+ (void)gettimeofday(&target, NULL); >+ timeout_tv.tv_sec = timeout.tv_sec; >+ timeout_tv.tv_usec = timeout.tv_nsec / 1000; >+ timeradd(&target, &timeout_tv, &target); > wait: > if (s < 0) { > Perror(stderr, "s out-of-bounds", EMFILE); >@@ -719,11 +725,25 @@ > > n = kevent(kq, &kv, 1, &kv, 1, &timeout); > if (n < 0) { >- if (errno == EINTR) >- goto wait; >- Perror(stderr, "kevent", errno); >- res_close(); >- goto next_ns; >+ if (errno == EINTR) { >+ struct timeval current; >+ >+ (void)gettimeofday(¤t, NULL); >+ if (timercmp(¤t, &target, >+ <)) { >+ timersub(&target, ¤t, >+ ¤t); >+ timeout.tv_sec = >+ current.tv_sec; >+ timeout.tv_nsec = >+ current.tv_usec * 1000; >+ goto wait; >+ } >+ } else { >+ Perror(stderr, "kevent", errno); >+ res_close(); >+ goto next_ns; >+ } > } > > if (n == 0) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 26665
: 14182