Re: Semaphores and threads anomaly and bug?

From: Linus Torvalds
Date: Tue Nov 04 2003 - 12:31:24 EST

On Tue, 4 Nov 2003, John M Collins wrote:
> I know this isn't defined anywhere but the seems to be an ambiguity and
> discrepancy between versions of Unix and Linux over threads and semaphores.
> Do the "SEM_UNDO"s get applied when a thread terminates or when the
> "whole thing" terminates?

It's entirely up to you. That's what CLONE_SYSVSEM is supposed to

However, CLONE_SYSVSEM is fairly recent, and I think you will need to use
the new threading libraries to see it.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at