Projet_SETI_RISC-V/riscv-gnu-toolchain/gdb/sim/testsuite/cris/c/clone5.c
2023-03-06 14:48:14 +01:00

35 lines
612 B
C

/* Check that unimplemented clone syscalls get the right treatment.
#progos: linux
#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;
}