💾 Archived View for thrig.me › tech › buffork.c captured on 2023-07-22 at 18:07:22.
⬅️ Previous capture (2023-04-26)
-=-=-=-=-=-=-
// buffork - buffer across a fork (bad) #include <stdio.h> #include <stdlib.h> #include <unistd.h> int main(void) { pid_t pid; printf("buffered in %d\n", getpid()); pid = fork(); if (pid == -1) abort(); printf("after in %d\n", getpid()); exit(0); }