summaryrefslogtreecommitdiff
path: root/sim/testsuite/sim/cris/c/clone5.c
blob: b642a2f1a3544212b397fbd541980fa54d402840 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* 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>

int pip[2];

int
process (void *arg)
{
  return 0;
}

int
main (void)
{
  int retcode;
  long stack[16384];

  clone (process, (char *) stack + sizeof (stack) - 64, 0, "cba");
  printf ("xyzzy\n");
  return 0;
}