about summary refs log tree commit diff
path: root/resource/bug-ulimit1.c
diff options
context:
space:
mode:
Diffstat (limited to 'resource/bug-ulimit1.c')
-rw-r--r--resource/bug-ulimit1.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/resource/bug-ulimit1.c b/resource/bug-ulimit1.c
new file mode 100644
index 0000000000..334d7fff04
--- /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;
+}