what is the problem of this code ? how to solved it ? (fork)

Posted by sb2367 on Stack Overflow See other posts from Stack Overflow or by sb2367
Published on 2010-04-09T21:42:10Z Indexed on 2010/04/09 21:43 UTC
Read the original article Hit count: 220

Filed under:
|
|
|

what is the problem of this code ? how to solved it ? parent processes goto in my tag or child process ?

#include <signal.h>
#include <sys/wait.h>
main() {
for (;;) {
if (!fork()) {
exit(0);
}
sleep(1);
}
}

© Stack Overflow or respective owner

Related posts about c++

Related posts about c