进程控制:#include "pctl.h" int main(int argc,char *argv[]){ int i; int pid1,pid2; int status1,status2; char *args1[]={"/bin/ls","-a",NULL}; char *args2[]={"/bin/ps","-a",NULL}; signal(SIGINT,(sighandler_t)sigcat); pid1=fork(); //printf("I am the first C
如下所示:
import os
import sys
import time
processNmae = 'parent'
print "Program executing ntpid:%d,processNmae:%s"%(os.gitpid(),processNmae)
#attempt to fork child process
try:
forkPid = os.fork()
except OSError:
sys.exit("Unable to create new proc