logoalt Hacker News

josefxyesterday at 8:40 PM1 replyview on HN

Can't you check what threads are active at the time you fork?


Replies

kccqzyyesterday at 10:30 PM

And what do you do with that information? Refuse to fork after you detect more than one thread running? I haven’t seen any code that gracefully handles the unable-to-fork scenario. When people write fork-based code, especially in Python, they always expect forking to succeed.