projects
/
external
/
binutils.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add support to GDB for the Renesas rl78 architecture.
[external/binutils.git]
/
sim
/
testsuite
/
sim
/
cris
/
c
/
kill1.c
1
/* Basic kill functionality test; fail killing init. Don't run as root. */
2
#include <stdio.h>
3
#include <stdlib.h>
4
#include <errno.h>
5
#include <sys/types.h>
6
#include <signal.h>
7
int
8
main (void)
9
{
10
if (kill (1, SIGTERM) != -1
11
|| errno != EPERM)
12
{
13
printf ("fail\n");
14
exit (1);
15
}
16
17
errno = 0;
18
19
if (kill (1, SIGABRT) != -1
20
|| errno != EPERM)
21
{
22
printf ("fail\n");
23
exit (1);
24
}
25
26
errno = 0;
27
28
printf ("pass\n");
29
exit (0);
30
}