[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new module 'get-rusage-as'
From: |
Bruno Haible |
Subject: |
Re: new module 'get-rusage-as' |
Date: |
Sun, 23 Jan 2011 18:58:03 +0100 |
User-agent: |
KMail/1.9.9 |
A small bug fix to this module:
2011-01-23 Bruno Haible <address@hidden>
get-rusage-as: Fix bug.
* lib/get-rusage-as.c (get_rusage_as_via_setrlimit): Restore the
original limit when aborting the first loop.
--- lib/get-rusage-as.c.orig Sun Jan 23 18:55:08 2011
+++ lib/get-rusage-as.c Sun Jan 23 18:43:00 2011
@@ -182,7 +182,7 @@
if (getrlimit (RLIMIT_AS, &orig_limit) < 0)
{
result = 0;
- goto done;
+ goto done2;
}
if (orig_limit.rlim_max != RLIM_INFINITY
@@ -192,7 +192,7 @@
So bail out. */
{
result = 0;
- goto done;
+ goto done2;
}
{
@@ -223,7 +223,7 @@
{
/* try_next could not be increased. */
result = low_bound;
- goto done;
+ goto done1;
}
try_limit.rlim_max = orig_limit.rlim_max;
@@ -311,11 +311,12 @@
result = low_bound;
}
+ done1:
/* Restore the original rlim_cur value. */
if (setrlimit (RLIMIT_AS, &orig_limit) < 0)
abort ();
- done:
+ done2:
# if !HAVE_MAP_ANONYMOUS
close (fd);
# endif
- patch for printf memory use tests, Bruce Korb, 2011/01/14
- Re: patch for printf memory use tests, Bruno Haible, 2011/01/14
- Re: patch for printf memory use tests, Bruce Korb, 2011/01/14
- new module 'get-rusage-as', Bruno Haible, 2011/01/16
- Re: new module 'get-rusage-as', Bruno Haible, 2011/01/18
- Re: new module 'get-rusage-as', Bruce Korb, 2011/01/18
- Re: new module 'get-rusage-as', Bruno Haible, 2011/01/26
- Re: new module 'get-rusage-as',
Bruno Haible <=
- Re: new module 'get-rusage-as', Bruno Haible, 2011/01/23