Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on The Beauty of Unix Pipelines. Parent comment
(1) you duplicate yourself with fork()
(2) the parent process continues about its business
(3) the created process calls execve() to become something else
This is the mechanism by which all new processes are created, from init (process 1) to anything you run from your shell.
Real life examples here, in this example of a Unix shell:
https://github.com/mirror/busybox/blob/master/shell/ash.c
There are no comments on this comment yet.
(1) you duplicate yourself with fork()
(2) the parent process continues about its business
(3) the created process calls execve() to become something else
This is the mechanism by which all new processes are created, from init (process 1) to anything you run from your shell.
Real life examples here, in this example of a Unix shell:
https://github.com/mirror/busybox/blob/master/shell/ash.c