Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

WHY?!

Name: Anonymous 2012-06-13 13:02


#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int main(int argc, char **argv){

    int cnt = 0;

    for(int i = 0; i < 10; i++){
        fork();
        cnt++;
    }
    printf("PID:  %d\n", getpid());

    printf("Count:  %d\n", cnt);

    return 0;
}


Copy. Paste. Compile. Run.

I only want 10 childprocess. Why is this?

PS: Yes, I'm new to programming

Name: Anonymous 2012-06-13 14:18

>>8
DOESN'T ANYBODY CHECK FOR ERRORS ANY MORE?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List