r/cpp • u/SatadeepDasgupta • Jul 03 '26
Windows doesn't have fork(), so I faked copy-on-write with VirtualProtect + exception handling to snapshot an in-memory KV store
0
Upvotes
r/cpp • u/SatadeepDasgupta • Jul 03 '26
View all comments
Show parent comment
3
u/wyrn Jul 07 '26
These techniques were developed on top of fork because fork was what was available. But it doesn't make fork a good idea. In particular, designing a core OS api just to simplify terminals/shells is completely backwards. It made sense in the 70s if you're hacking an OS together with spit and duct tape. It doesn't make sense anymore.