|
From: <sv...@va...> - 2008-05-27 13:40:35
|
Author: bart
Date: 2008-05-27 14:40:36 +0100 (Tue, 27 May 2008)
New Revision: 8134
Log:
Make the rlimit_nofile regression tests less system dependent.
Modified:
trunk/none/tests/rlimit_nofile.c
Modified: trunk/none/tests/rlimit_nofile.c
===================================================================
--- trunk/none/tests/rlimit_nofile.c 2008-05-27 12:33:29 UTC (rev 8133)
+++ trunk/none/tests/rlimit_nofile.c 2008-05-27 13:40:36 UTC (rev 8134)
@@ -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");
|