Created
January 27, 2011 20:36
-
-
Save joehakimrahme/799207 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
int main(int argc, char** argv){ | |
fork(); | |
/* The function getpid() returns the PID of the current process */ | |
fprintf(stdout, "I'm a process, my PID is: %d", getpid()); | |
return EXIT_SUCCESS; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment