diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-27 07:21:58 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-27 07:21:58 +0000 |
commit | 97c42bcfb8716844d3e3cf048cc7ae52e3b38fc9 (patch) | |
tree | bb8c6330ee9a546e57d663c29cc6bd9b71a78a5d | |
parent | a3cfae6e2fb8693e935d2865ccdb1188d07d1241 (diff) | |
download | chromium_src-97c42bcfb8716844d3e3cf048cc7ae52e3b38fc9.zip chromium_src-97c42bcfb8716844d3e3cf048cc7ae52e3b38fc9.tar.gz chromium_src-97c42bcfb8716844d3e3cf048cc7ae52e3b38fc9.tar.bz2 |
Use a dedicated command line flag for FIFO IPC channels on POSIX.
This fixes a problem I hit when porting startup_tests that the controlling
startup_tests process didn't use FIFO, and the child chrome process did
(and obviously they couldn't communicate).
Review URL: http://codereview.chromium.org/27220
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10593 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/common/chrome_switches.cc | 4 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 2 | ||||
-rw-r--r-- | chrome/common/ipc_channel_posix.cc | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index a33043a..c4b4512 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -388,4 +388,8 @@ const wchar_t kTestName[] = L"test-name"; // command line. (Useful values might be "valgrind" or "gdb --args") const wchar_t kRendererCmdPrefix[] = L"renderer-cmd-prefix"; +// On POSIX only: use FIFO for IPC channels so that "unrelated" process +// can connect to a channel, provided it knows its name. For debugging purposes. +const wchar_t kIPCUseFIFO[] = L"ipc-use-fifo"; + } // namespace switches diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 0df8dbd..cce31ad 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -149,6 +149,8 @@ extern const wchar_t kTestName[]; extern const wchar_t kRendererCmdPrefix[]; +extern const wchar_t kIPCUseFIFO[]; + } // namespace switches #endif // CHROME_COMMON_CHROME_SWITCHES_H__ diff --git a/chrome/common/ipc_channel_posix.cc b/chrome/common/ipc_channel_posix.cc index e29596c..f637277 100644 --- a/chrome/common/ipc_channel_posix.cc +++ b/chrome/common/ipc_channel_posix.cc @@ -246,7 +246,7 @@ Channel::ChannelImpl::ChannelImpl(const std::wstring& channel_id, Mode mode, is_blocked_on_write_(false), message_send_bytes_written_(0), uses_fifo_(CommandLine::ForCurrentProcess()->HasSwitch( - switches::kTestingChannelID)), + switches::kIPCUseFIFO)), server_listen_pipe_(-1), pipe_(-1), client_pipe_(-1), |