aboutsummaryrefslogtreecommitdiff
path: root/sim/testsuite/cris/c/ugetrlimit1.c
blob: 6f3eb4d11d8d879033e5e93ba06fec5c5be52db9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* Check corner error case: specifying unimplemented resource.
#progos: linux
*/

#include <sys/time.h>
#include <sys/resource.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>

int main (void)
{
  struct rlimit lim;

  if (getrlimit (RLIMIT_NPROC, &lim) != -1
      || errno != EINVAL)
    abort ();
  printf ("pass\n");
  exit (0);
}