1 /* Ltrace Test : trace-clone.c.
2 Objectives : Verify that ltrace can trace to child process after
5 This file was written by Yao Qi <qiyao@cn.ibm.com>. */
19 typedef int (* myfunc)();
21 #define STACK_SIZE 1024
26 static __attribute__ ((aligned (16))) char stack[STACK_SIZE];
29 pid = __clone2((myfunc)&child, stack, STACK_SIZE, CLONE_FS, NULL);
31 pid = clone((myfunc)&child, stack + STACK_SIZE, CLONE_FS, NULL);
35 perror("clone called failed");