Chromium Code Reviews
DescriptionIt's a copy of http://codereview.chromium.org/155772, with the fix for valgrind test failure.
This CL implements the second TODO item of issue 12343:
2) We should send back an ACK to the second process. If the second process doesn't get an ACK in the given timeout, it should kill the first process and go ahead and start.
The approach of this CL is to append process id to the singleton's socket filename, such as "SingletonSocket-12345", and creates a symbol link "SingletonSocket" to the real socket file. In ProcessSingleton::NotifyOtherProcess() if it's successfully connected to "SingletonSocket" but no ACK received, then the original process can be killed by its process id retrieved from the symbol link.
BUG=12343
ProcessSingleton Linux cleanups
TEST=In one terminal, launch chrome and stop the process by pressing ctrl-z, then launch chrome again in another terminal. The second chrome shall be started in 5 seconds, and the first one shall be killed.
Patch Set 1 #Patch Set 2 : '' #Patch Set 3 : '' #Patch Set 4 : '' #Patch Set 5 : '' #
Messages
Total messages: 10 (0 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||