diff options
Diffstat (limited to 'resource')
-rw-r--r-- | resource/Makefile | 5 | ||||
-rw-r--r-- | resource/bug-ulimit1.c | 21 |
2 files changed, 24 insertions, 2 deletions
diff --git a/resource/Makefile b/resource/Makefile index 68f9ff6..705c736 100644 --- a/resource/Makefile +++ b/resource/Makefile @@ -1,4 +1,5 @@ -# Copyright (C) 1991,1992,1994,1995,1997,2005 Free Software Foundation, Inc. +# Copyright (C) 1991,1992,1994,1995,1997,2005,2008 +# Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -24,6 +25,6 @@ headers := sys/resource.h bits/resource.h sys/vlimit.h sys/vtimes.h \ routines := getrlimit setrlimit getrlimit64 setrlimit64 getrusage ulimit \ vlimit vtimes getpriority setpriority nice -tests = tst-getrlimit +tests = tst-getrlimit bug-ulimit1 include ../Rules diff --git a/resource/bug-ulimit1.c b/resource/bug-ulimit1.c new file mode 100644 index 0000000..334d7ff --- /dev/null +++ b/resource/bug-ulimit1.c @@ -0,0 +1,21 @@ +#include <ulimit.h> +#include <stdio.h> + +int +main (void) +{ + int retval = 0; + long int res; + + res = ulimit (UL_SETFSIZE, 10000); + printf ("Result of ulimit (UL_SETFSIZE, 10000): %ld\n", res); + if (res != 10000) + retval = 1; + + res = ulimit (UL_GETFSIZE); + printf ("Result of ulimit(UL_GETFSIZE): %ld\n", res); + if (res != 10000) + retval = 1; + + return retval; +} |