Skip to content

Instantly share code, notes, and snippets.

@joehakimrahme
Created January 27, 2011 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joehakimrahme/799207 to your computer and use it in GitHub Desktop.
Save joehakimrahme/799207 to your computer and use it in GitHub Desktop.
#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