hi
i have code that i have to implement in c#
i know the code is creating child process mine question is can we do fork in c# or is there any other method to do so eg threading etc
i have code that i have to implement in c#
| Code: |
|
/* Become deamon + unstopable and no zombies children (= no wait()) */ if(fork() != 0) return 0; /* parent returns OK to shell */ (void)signal(SIGCLD, SIG_IGN); /* ignore child death */ (void)signal(SIGHUP, SIG_IGN); /* ignore terminal hangups */ for(i=0;i<32;i++) (void)close(i); /* close open files */ (void)setpgrp(); /* break away from process group */ if((pid = fork()) < 0) { log(ERROR,"system call","fork",0); } else { if(pid == 0) { /* child */ (void)close(listenfd); web(socketfd,hit); /* never returns */ } else { /* parent */ (void)close(socketfd); } } } |
i know the code is creating child process mine question is can we do fork in c# or is there any other method to do so eg threading etc
