bug-ulimit1.c 374 B

123456789101112131415161718192021
  1. #include <ulimit.h>
  2. #include <stdio.h>
  3. int
  4. main (void)
  5. {
  6. int retval = 0;
  7. long int res;
  8. res = ulimit (UL_SETFSIZE, 10000L);
  9. printf ("Result of ulimit (UL_SETFSIZE, 10000): %ld\n", res);
  10. if (res != 10000)
  11. retval = 1;
  12. res = ulimit (UL_GETFSIZE);
  13. printf ("Result of ulimit(UL_GETFSIZE): %ld\n", res);
  14. if (res != 10000)
  15. retval = 1;
  16. return retval;
  17. }