]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Make the rlimit_nofile regression tests less system dependent.
authorBart Van Assche <bvanassche@acm.org>
Tue, 27 May 2008 13:40:36 +0000 (13:40 +0000)
committerBart Van Assche <bvanassche@acm.org>
Tue, 27 May 2008 13:40:36 +0000 (13:40 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8134

none/tests/rlimit_nofile.c

index ed12af38ee6abc277ac06c67dd28a387ee0c0ae8..c563c5f304c33c7d6667ab84ac3c6229b0e4b9cb 100644 (file)
@@ -4,13 +4,16 @@
 #include <stdlib.h>
 #include <sys/resource.h>
 #include <unistd.h>
+#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");