repo.or.cz
/
binutils-gdb.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Update release-README after completing the 2.43 release.
[binutils-gdb.git]
/
sim
/
testsuite
/
cris
/
c
/
setrlimit1.c
blob
1222619c2f0346329c53130218cae491ec2aaa05
1
/* Check corner error case: specifying unimplemented resource.
2
#progos: linux
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
}