fork download
  1. #include <stdio.h>
  2. #include <sys/time.h>
  3. #include <sys/resource.h>
  4.  
  5. int main (void)
  6. {
  7. struct rlimit limit;
  8.  
  9. getrlimit (RLIMIT_STACK, &limit);
  10. printf ("\nStack Limit = %d and %d max\n", limit.rlim_cur, limit.rlim_max);
  11. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
cc1: warnings being treated as errors
prog.c: In function ‘main’:
prog.c:10: error: format ‘%d’ expects type ‘int’, but argument 2 has type ‘rlim_t’
prog.c:10: error: format ‘%d’ expects type ‘int’, but argument 3 has type ‘rlim_t’
stdout
Standard output is empty