From: Bart Van Assche Date: Tue, 27 May 2008 13:40:36 +0000 (+0000) Subject: Make the rlimit_nofile regression tests less system dependent. X-Git-Tag: svn/VALGRIND_3_4_0~550 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c3ed10e1acea52d7febfd9cba1578f8879c58eda;p=thirdparty%2Fvalgrind.git Make the rlimit_nofile regression tests less system dependent. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8134 --- diff --git a/none/tests/rlimit_nofile.c b/none/tests/rlimit_nofile.c index ed12af38ee..c563c5f304 100644 --- a/none/tests/rlimit_nofile.c +++ b/none/tests/rlimit_nofile.c @@ -4,13 +4,16 @@ #include #include #include +#include "fdleak.h" int main(int argc, char **argv) { struct rlimit oldrlim; struct rlimit newrlim; int fd; - close(4); /* seems to be inherited from parent on SuSE 10.1 amd64 */ + + CLOSE_INHERITED_FDS; + if (getrlimit(RLIMIT_NOFILE, &oldrlim) < 0) { perror("getrlimit");