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] - Diff between revs 24 and 157

Only display areas with differences | Details | Blame | View Log

Rev 24 Rev 157
/* Basic kill functionality test; fail killing init.  Don't run as root.  */
/* Basic kill functionality test; fail killing init.  Don't run as root.  */
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <errno.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/types.h>
#include <signal.h>
#include <signal.h>
int
int
main (void)
main (void)
{
{
  if (kill (1, SIGTERM) != -1
  if (kill (1, SIGTERM) != -1
      || errno != EPERM)
      || errno != EPERM)
    {
    {
      printf ("fail\n");
      printf ("fail\n");
      exit (1);
      exit (1);
    }
    }
 
 
  errno = 0;
  errno = 0;
 
 
  if (kill (1, SIGABRT) != -1
  if (kill (1, SIGABRT) != -1
      || errno != EPERM)
      || errno != EPERM)
    {
    {
      printf ("fail\n");
      printf ("fail\n");
      exit (1);
      exit (1);
    }
    }
 
 
  errno = 0;
  errno = 0;
 
 
  printf ("pass\n");
  printf ("pass\n");
  exit (0);
  exit (0);
}
}
 
 

powered by: WebSVN 2.1.0

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