3 ms·
It's much less of a problem in a single-threaded program because no other threads can be running at the point where you call fork(). So there's no worry about a
by lmm 12y ago
It's much less of a problem in a single-threaded program because no other threads can be running at the point where you call fork(). So there's no worry about a mutex being held (assuming you don't fork with a mutex held, but don't do that), and you can know exactly which files are open at that point in time.