projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
No busy looping around open()
[collectd.git]
/
src
/
zone.c
diff --git
a/src/zone.c
b/src/zone.c
index
385e511
..
78e91ef
100644
(file)
--- a/
src/zone.c
+++ b/
src/zone.c
@@
-65,10
+65,8
@@
zone_read_procfile(char *pidstr, char *file, void *buf, size_t bufsize)
char procfile[MAX_PROCFS_PATH];
(void)snprintf(procfile, sizeof(procfile), "/proc/%s/%s", pidstr, file);
char procfile[MAX_PROCFS_PATH];
(void)snprintf(procfile, sizeof(procfile), "/proc/%s/%s", pidstr, file);
- while ((fd = open(procfile, O_RDONLY)) == -1) {
- if ((errno != EMFILE) || (errno != ENFILE)) {
- return(1);
- }
+ if ((fd = open(procfile, O_RDONLY)) == -1) {
+ return (1);
}
if (pread(fd, buf, bufsize, 0) != bufsize) {
}
if (pread(fd, buf, bufsize, 0) != bufsize) {