OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gdb-7.1/] [sim/] [testsuite/] [sim/] [cris/] [c/] [setrlimit1.c] - Blame information for rev 834

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 227 jeremybenn
/* Check corner error case: specifying unimplemented resource.
2
#notarget: cris*-*-elf
3
*/
4
#include <sys/time.h>
5
#include <sys/resource.h>
6
#include <unistd.h>
7
#include <stdio.h>
8
#include <errno.h>
9
#include <stdlib.h>
10
#include <string.h>
11
 
12
int main (void)
13
{
14
  struct rlimit lim;
15
  memset (&lim, 0, sizeof lim);
16
 
17
  if (setrlimit (RLIMIT_NPROC, &lim) != -1
18
      || errno != EINVAL)
19
    abort ();
20
  printf ("pass\n");
21
  exit (0);
22
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.