nc 0.9.7

Access system calls directly
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

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

int main() {
  int pid = fork();
  if (pid < 0) {
    return 1;
  } else if (pid == 0) {
    printf("[child] pid: %d\n", getpid());
    return 0;
  } else {
    printf("[parent] child pid is: %d\n", pid);
  }
  return 0;
}