Comment by PhilipRoman
Comment by PhilipRoman 2 days ago
Most kernel resources are fairly well behaved, as they will automatically decrement their refcount when a process exits. Even mutexes have a "robust" flag for this exact reason. Programs which rely on destructors or any other form or orderly exit are always brittle and should be rewritten to use atomic operations.
Which kernel, on which specific OS?
This is a very non portable assumption, even we constrain it to only across UNIX/POSIX flavours.