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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [sim/] [testsuite/] [sim/] [cris/] [c/] [kill1.c] - Blame information for rev 24

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

Line No. Rev Author Line
1 24 jeremybenn
/* 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
}

powered by: WebSVN 2.1.0

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