rlimit.c revision e739ac0589b4fb43561f801c4faba8c1b89f8680
1// Small test program to demonstrate Valgrind bug.
2// https://bugs.kde.org/show_bug.cgi?id=191761
3// Author: rohitrao@google.com
4//
5// Before the fix, it was printing 266.  Now it prints 256.
6
7#include <stdio.h>
8#include <sys/resource.h>
9
10int main(void)
11{
12   struct rlimit rlp;
13   getrlimit(RLIMIT_NOFILE, &rlp);
14   fprintf(stderr, "RLIMIT_NOFILE is %lld\n", (long long)rlp.rlim_cur);
15   return 0;
16}
17
18