r/C_Programming • • Sep 01 '26

Question How process ids are generated

i know fork creates processes but how process ids are generated

6 Upvotes

22 comments sorted by

View all comments

Show parent comment

5

u/Paul_Pedant Sep 01 '26

... apart from the bit where the OS has cycled round at least once, and needs to know that some of the pids are still referencing running processes. And the ones that are defunct but still not notified to their parent.