File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -33,17 +33,20 @@ __attribute__((visibility("default"))) @interface SSYSemaphorePidKey : NSObject
33
33
SSYSemaphore features a time limit (timeLimit) to mitigate this
34
34
danger.
35
35
36
- SSYSemaphore is implemented by writing a process identifier (pidd ) and an
37
- arbitrary user-defined key into an "info file".
36
+ SSYSemaphore is implemented by writing a process identifier (pid ) and an
37
+ arbitrary user-defined key into an "info file" (named SSYSemaphore-Info) .
38
38
39
39
Simultaneous access to the info file is limited to one contending process
40
- by a "lock file", as described in these links…
40
+ by a "lock file" (named SSYSemaphore-Lock) , as described in these links…
41
41
• http://stackoverflow.com/questions/2053679/how-do-i-recover-a-semaphore-when-the-process-that-decremented-it-to-zero-crashe
42
- • http://charette.no-ip.com:81/programming/2010-01-13_PosixSemaphores/index.html
42
+ • http://charette.no-ip.com:81/programming/2010-01-13_PosixSemaphores/index.html
43
43
Those links also explain why I use the "lock file" idea instead of named
44
44
POSIX semaphores. (Briefly, named POSIX semaphores are not cleaned up by
45
45
macOS if their owning processes crash, which causes a logjam until the
46
46
user logs out and back in.
47
+
48
+ Note that the SSYSemaphore-Lock is never deleted from ~/Library/Application
49
+ Support/<MotherAppName>. Don't worry about it. It contains 0 bytes.
47
50
48
51
When using this class, [NSApp delegate] must conform to protocol
49
52
SSYAppSupporter.
You can’t perform that action at this time.
0 commit comments