summaryrefslogtreecommitdiff
path: root/boehm-gc
diff options
context:
space:
mode:
authorJeff Sturm <jsturm@one-point.com>2002-03-25 18:23:36 +0000
committerJeff Sturm <jsturm@gcc.gnu.org>2002-03-25 18:23:36 +0000
commit95ae1c5b350dde366fa58a2f7d3318481884b82b (patch)
tree27bcba18377c10fd44f8e257b039df3bbeccf57e /boehm-gc
parent2e0e3ef1eb609aa2638a4d3ff9e58dc837ca094d (diff)
downloadgcc-95ae1c5b350dde366fa58a2f7d3318481884b82b.tar.gz
* linux_threads.c (GC_get_nprocs): Close file descriptor.
From-SVN: r51323
Diffstat (limited to 'boehm-gc')
-rw-r--r--boehm-gc/ChangeLog4
-rw-r--r--boehm-gc/linux_threads.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog
index 992483b4aaa..14c46bcee67 100644
--- a/boehm-gc/ChangeLog
+++ b/boehm-gc/ChangeLog
@@ -1,3 +1,7 @@
+2002-03-24 Jeff Sturm <jsturm@one-point.com>
+
+ * linux_threads.c (GC_get_nprocs): Close file descriptor.
+
2002-03-15 Anthony Green <green@redhat.com>
* misc.c (GC_init_inner): Initialize GC_write_cs before use.
diff --git a/boehm-gc/linux_threads.c b/boehm-gc/linux_threads.c
index b26988cef9e..89921340879 100644
--- a/boehm-gc/linux_threads.c
+++ b/boehm-gc/linux_threads.c
@@ -1015,6 +1015,7 @@ int GC_get_nprocs()
WARN("Couldn't read /proc/stat\n", 0);
return -1;
}
+ close(f);
for (i = 0; i < len - 100; ++i) {
if (stat_buf[i] == '\n' && stat_buf[i+1] == 'c'
&& stat_buf[i+2] == 'p' && stat_buf[i+3] == 'u') {