You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
514 B
21 lines
514 B
--- 011-old/clone.c 2021-07-04 17:44:05.000000000 +0800
|
|
+++ 011/clone.c 2021-07-07 10:42:29.000000000 +0800
|
|
@@ -21,7 +21,7 @@
|
|
va_start(arg,child_stack);
|
|
__asm__("int $0x80"
|
|
:"=a" (res)
|
|
- :"0" (__NR_open),"b" (fn),"c" (child_stack),
|
|
+ :"0" (__NR_clone),"b" (fn),"c" (child_stack),
|
|
"d" (va_arg(arg,int)));
|
|
if (res>=0)
|
|
return res;
|
|
@@ -36,7 +36,7 @@
|
|
static int child_func(void * arg){
|
|
g_shared = 1;
|
|
printf(" Child says hello.\n");
|
|
- return 0;
|
|
+ exit(0);
|
|
}
|
|
|
|
void test_clone(void){
|