首页 > 代码库 > 进程创建注意事项:函数及对应包

进程创建注意事项:函数及对应包

printf:#include<stdio.h>

_exit(0):#include<unistd.h>

file(fd):#include<fcntl.h>

clone():#include<sched.h>

malloc():#include<malloc.h>

最重要的:#define _GNU_SOURCE

参考:

(1)未声明的CLONE_VM的解释:

http://stackoverflow.com/questions/22449342/clone-vm-undeclared-first-use-in-this-function

(2)#define _GNU_SOURCE解释:

http://stackoverflow.com/questions/5582211/what-does-define-gnu-source-imply

进程创建注意事项:函数及对应包