diff options
author | Geoff Keating <geoffk@cygnus.com> | 2000-10-24 21:12:01 +0000 |
---|---|---|
committer | Geoff Keating <geoffk@cygnus.com> | 2000-10-24 21:12:01 +0000 |
commit | feb27893326f6740b1e2b7af592319127df26aec (patch) | |
tree | 359ecea477975c8243dfa2ecf608150162b8cea3 | |
parent | 0a1e7f70eb344d75df116940a5d887c6154a4b41 (diff) | |
download | glibc-feb27893326f6740b1e2b7af592319127df26aec.tar.gz glibc-feb27893326f6740b1e2b7af592319127df26aec.tar.xz glibc-feb27893326f6740b1e2b7af592319127df26aec.zip |
* io/test-lfs.c (do_prepare): Call setrlimit64, in case the user
has a limit set---for instance, a limit of 2^31 bytes, which can't easily be reset by non-LFS-aware shells. 2000-10-24 Geoffrey Keating <geoffk@cygnus.com> * io/test-lfs.c (do_prepare): Call setrlimit64, in case the user has a limit set---for instance, a limit of 2^31 bytes, which can't easily be reset by non-LFS-aware shells.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | io/test-lfs.c | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index e96abacf80..364279eca6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ -2000-10-21 Geoffrey Keating <geoffk@cygnus.com> +2000-10-24 Geoffrey Keating <geoffk@cygnus.com> + + * io/test-lfs.c (do_prepare): Call setrlimit64, in case the user + has a limit set---for instance, a limit of 2^31 bytes, which can't + easily be reset by non-LFS-aware shells. * sysdeps/unix/sysv/linux/powerpc/mmap64.c: Define PAGE_SHIFT explicitly rather than getting it from <asm/page.h>. diff --git a/io/test-lfs.c b/io/test-lfs.c index f73e67e0ef..16b2be9718 100644 --- a/io/test-lfs.c +++ b/io/test-lfs.c @@ -24,6 +24,7 @@ #include <fcntl.h> #include <error.h> #include <errno.h> +#include <sys/resource.h> /* Prototype for our test function. */ extern void do_prepare (int argc, char *argv[]); @@ -70,6 +71,11 @@ do_prepare (int argc, char *argv[]) if (fd == -1) error (EXIT_FAILURE, errno, "cannot open test file `%s'", name); + + if (setrlimit64 (RLIMIT_FSIZE, &((const struct rlimit64) + { RLIM_INFINITY, RLIM_INFINITY })) + == -1) + error (EXIT_FAILURE, errno, "cannot reset file size limits"); } int |