5 ms·
Nope, it won't quit. In failure fork returns -1, what's still true... But the forked processes will quit as soon as they are created. Thus, it won't work anywa
by marcosdumay 12y ago
Nope, it won't quit. In failure fork returns -1, what's still true...
But the forked processes will quit as soon as they are created. Thus, it won't work anyway.
- dllthomas 12y agoParent said as soon as it is able to fork a new process, which still isn't quite right (it's the child that quits, as you say) but not the error you seem to be responding to.
- marcosdumay 12y agoHe didn't say this when I replied.
- dllthomas 12y agoAh, do you remember what it said?
- TheLoneWolfling 12y agoI got it swapped around initially: "while(1) {fork()}; is "better", as the version you mention will quit as soon as it is not able to fork a new process." or something similar
- dllthomas 12y agoGotcha.