《linux编及应用-任继平》07第07章 linux进程管理与程序开发.ppt

《linux编及应用-任继平》07第07章 linux进程管理与程序开发.ppt

《linux编及应用-任继平》07第07章 linux进程管理与程序开发

* * 验证fork是否在子进程复制验证代码 验证数据段(使用全局、静态初始化变量),BSS段(未初始化全局,静态变量),栈(局部变量),堆(malloc返回空间)。 代码见教材。 * * vfork /* Clone the calling process, but without copying the whole address space. The calling process is suspended until the new process exits or is replaced by a call to `execve. Return -1 for errors, 0 to the new process, and the process ID of the new process to the old process. */ extern __pid_t vfork (void) ; #endif * * Vfork与fork比较验证代码 见教材代码。 * * execX函数执行新代码 * * execX函数比较 函数 使用文件名 使用路径名 使用参数表 (函数出现字母l) 使用argv (函数出现字母v) execl √ √ execlp √ √ execle √ √ execv √ √ execvp √ √ execve √ √ * *

文档评论(0)

1亿VIP精品文档

相关文档