vfork創建進程

1. #include <sys/types.h> #include <unistd.h> #include <stdio.h> int main() { pid_t pid; pid = fork(); if(pid>0) { while(1) { printf(「this is father print,pid = %d\n」,getpid()); sleep(1); } } else if(
相關文章
相關標籤/搜索