answerstu

sigchld - Can't ignore signal CHLD, forcing to default

#include <sys/types.h> #include <stddef.h> #include <stdlib.h> #include <sys/wait.h> #include <signal.h> #include <iostream> #include <unistd.h> int main(){ signal(SIGCHLD,SIG_IGN ); pid_t pid = vfork(); if(pid <0){ std::cout<< "Error: Fork failed at main!!!"; exit(1); }else if (0 == pid){ char * cmd[] ={(char*)"../work/C++11/Prj_LargeFile/script/Logger.pl",NULL}; //char * cmd[] = {(char*)"pwd",NULL}; //char * c...Read more