Process Table

PID Registers File Descriptors
324 %rax, %rbx… 1, 2, 0, 3
2481

Fork will copy a PID exactly:

PID Registers File Descriptors
324 %rax, %rbx… 1, 2, 0, 3
325 %rax, %rbx… 1, 2, 0, 3
2481

However, some differences:

File Descriptors

What if we want some process a to talk to some process b? In other words, make fd 1 of process a talk to fd0 of process b.

a > tmpfile &
b < tmpfile

What’s wrong with this approach?

Pipes