Currently there are different implementations of ProcessSingleton and ChromeBrowserProcessId() on Windows, Linux and Mac. Most of them are quite hacky, so there should be a better way. I think current IPC system with slight modifications can replace them all.
Now: 1. Windows Hidden top-level window is used for getting Chrome pid and IPC on startup. 2. Linux UNIX socket is used for IPC on startup, and fuser program is launched on it to get the pid - IMHO not the best way to do it. 3. Mac There is no ProcessSingleton on Mac, as it's not needed. Chrome pid comes out of some hack with ps output. I suggest: Don't try to get pid dynamically, but create on startup in datadir file 'ChromePid' or something like that with pid. Also, create an IPC channel with channel_id equal to pid with forced FIFO mode on POSIX. Current POSIX implementation should be modified to allow this and to store socket in datadir, not in /var/tmp. Then ProcessSingleton check would be simple and crossplatform: find pid file, read pid, connect to channel, send some message and wait for response. This eliminates all differences between platforms in process_singleton_* and chrome_process_util_*. What do you think? --~--~---------~--~----~------------~-------~--~----~ Chromium Developers mailing list: [email protected] View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~----------~----~----~----~------~----~------~--~---
