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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gdb-6.8/] [sim/] [testsuite/] [sim/] [cris/] [c/] [clone5.c] - Rev 24

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

/* Check that unimplemented clone syscalls get the right treatment.
#notarget: cris*-*-elf
#xerror:
#output: Unimplemented clone syscall *
#output: program stopped with signal 4.\n
*/
 
#include <stddef.h>
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <errno.h>
 
int pip[2];
 
int
process (void *arg)
{
  return 0;
}
 
int
main (void)
{
  int retcode;
  long stack[16384];
 
  retcode = clone (process, (char *) stack + sizeof (stack) - 64, 0, "cba");
  if (retcode == -1 && errno == ENOSYS)
    printf ("ENOSYS\n");
  printf ("xyzzy\n");
  return 0;
}
 

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

powered by: WebSVN 2.1.0

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