summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorWichert Akkerman <wichert@deephackmode.org>2000-04-10 22:26:39 +0000
committerWichert Akkerman <wichert@deephackmode.org>2000-04-10 22:26:39 +0000
commit529f06d9c959da041be82bad8f4eb9bb97377168 (patch)
tree94d5a344e668007ebc8fb03a53275cc7bad65b20 /test
parentc792698a99b640e7d256e8692c992bd967f0c5b2 (diff)
downloadstrace-529f06d9c959da041be82bad8f4eb9bb97377168.tar.gz
strace-529f06d9c959da041be82bad8f4eb9bb97377168.tar.bz2
strace-529f06d9c959da041be82bad8f4eb9bb97377168.tar.xz
add clone test
Diffstat (limited to 'test')
-rw-r--r--test/clone.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/clone.c b/test/clone.c
new file mode 100644
index 0000000..4fb6613
--- /dev/null
+++ b/test/clone.c
@@ -0,0 +1,16 @@
+#include <stdio.h>
+#include <sched.h>
+
+int child(void* arg) {
+ write(1, "clone\n", 6);
+ return 0;
+}
+
+int
+main()
+{
+ char stack[4096];
+ if (clone(child, stack+4000, CLONE_VM|CLONE_FS|CLONE_FILES, NULL) == 0)
+ write(1, "original\n", 9);
+ exit(0);
+}