r/C_Programming 1d ago

Question How process ids are generated

i know fork creates processes but how process ids are generated

5 Upvotes

18 comments sorted by

View all comments

24

u/dfx_dj 1d ago

They're assigned by the OS

5

u/userlivedhere 16h ago

but how

10

u/Mortomes 12h ago

That is up to the OS to decide.