FreeBSD Bugzilla – Attachment 12974 Details for
Bug 24857
File descriptor leak and frequent crashes of rpc.rstatd [PATCH]
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.04 KB, created by
Martin Butkus
on 2001-02-05 00:00:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Martin Butkus
Created:
2001-02-05 00:00:01 UTC
Size:
1.04 KB
patch
obsolete
>--- libexec/rpc.rstatd/rstat_proc.c.orig Tue Jan 16 16:27:09 2001 >+++ libexec/rpc.rstatd/rstat_proc.c Sat Jan 20 14:47:32 2001 >@@ -99,7 +99,7 @@ > > void updatestat(); > static stat_is_init = 0; >-static kvm_t *kd; >+static kvm_t *kd = NULL; > > static int cp_time_xlat[RSTAT_CPUSTATES] = { CP_USER, CP_NICE, CP_SYS, > CP_IDLE }; >@@ -203,15 +203,20 @@ > #ifdef DEBUG > fprintf(stderr, "about to closedown\n"); > #endif >- if (from_inetd) >+ if (from_inetd) { >+ kvm_close(kd); > exit(0); >+ } > else { > stat_is_init = 0; > return; > } > } >+ >+ alarm(0); > sincelastreq++; > >+ > mib[0] = CTL_KERN; > mib[1] = KERN_CLOCKRATE; > len = sizeof clockrate; >@@ -315,7 +320,9 @@ > > int en; > >- if ((kd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, errbuf)) == NULL) { >+ >+ if (kd == NULL && >+ (kd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, errbuf)) == NULL) { > syslog(LOG_ERR, "rpc.rstatd, %s", errbuf); > exit(1); > }
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 24857
: 12974