POSIX folks: What's the recommended way to create a system-wide mutex shared by all user accounts on a system?
-
-
Replying to @azonenberg
I tried using flock(LOCK_EX) with a file in /tmp but this seems to only work between processes running under a single user
2 replies 2 retweets 1 like -
Replying to @azonenberg
that's unexpected. I've just tried flock(LOCK_EX) from two different users and it seems to work fine..
1 reply 0 retweets 0 likes
Replying to @oe1cxw @azonenberg
but flock() is not POSIX. It's a BSD system call. fcntl() advisory record locking is a POSIX API.
5:24 AM - 30 Oct 2016
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.