summaryrefslogtreecommitdiffstats
path: root/ipc/file_descriptor_set_posix.h
Commit message (Collapse)AuthorAgeFilesLines
* IPC: Get rid of FileDescriptor usage from FileDescriptorSet and Messagemorrita2014-09-241-13/+15
| | | | | | | | | | | | | | | This is a step toward to killing FileDescriptor. This change lets FiileDescriptorSet have both Files (for owning fds) and PlatformFiles (for non-owning fds). Doing this, we no longer need FileDescriptor which provides |auto_close| flag. BUG=415294 TEST=ipc_tests, ipc_mojo_unittests R=agl@chromium.org, jam@hcromium.org, viettrungluu@chromium.org Review URL: https://codereview.chromium.org/583473002 Cr-Commit-Position: refs/heads/master@{#296498}
* Alternative workaround for mac kernel bug.hubbe@chromium.org2013-10-151-0/+3
| | | | | | | | | | BUG=298276 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=227999 Review URL: https://codereview.chromium.org/25325002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228569 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 227999 "Alternative workaround for mac kernel bug."benwells@chromium.org2013-10-111-3/+0
| | | | | | | | | | | | | | | | | > Alternative workaround for mac kernel bug. > > BUG=298276 > > Review URL: https://codereview.chromium.org/25325002 This change seemed to cause the Mac ASAN bot to timeout when running the ipc_tests. TBR=hubbe@chromium.org Review URL: https://codereview.chromium.org/26384003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228110 0039d316-1c4b-4281-b951-d872f2087c98
* Alternative workaround for mac kernel bug.hubbe@chromium.org2013-10-101-0/+3
| | | | | | | | BUG=298276 Review URL: https://codereview.chromium.org/25325002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227999 0039d316-1c4b-4281-b951-d872f2087c98
* Increase maximum file descriptors per IPC message on POSIX from 5 to 7.tommycli@chromium.org2013-08-291-1/+1
| | | | | | | | | | | | | | On POSIX, the maximum number of file descriptors passable in an IPC message is controlled by a constant 'kMaxDescriptorsPerMessage'. It's currently set at 5. This patch makes it 7. The Picasa album table reader utility process (https://codereview.chromium.org/18986012/) needs to pass 7 files to the utility process. This works on Windows, but fails on POSIX (Mac), due to the aforementioned limit. This CL increases this limit to 7, as well as adds some DLOG messages to give better info to developers who hit this limit. ipc_channel_posix.cc seems to indicate adding extra file descriptors just makes the messages longer by an 'int' per file descriptor. Making the maximum even larger would be okay with me too. BUG= Review URL: https://chromiumcodereview.appspot.com/23534018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220371 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the rest of #pragma once in one big CL.ajwong@chromium.org2012-07-111-1/+0
| | | | | | | | | For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
* Convert some constants declared as anonymous enums into static consts so ↵pkasting@chromium.org2011-09-011-3/+1
| | | | | | | | | | | | | | they have types. This defines the constants where they're declared to preserve the existing readability as well as allow us to do things like dimension arrays based on the values of the constants. The drawback to defining constants at their declaration point is that supplying them to a templated function, like what DCHECK_EQ() expands into, triggers an "undefined symbol" error on Mac/Linux (and adding explicit storage for them in the .cc file can cause duplicate symbol errors on Windows). Here I've worked around that by converting DCHECK_EQ(a, b) to DCHECK(b == a). The original motiviation for this change was to find a way to eliminate some cases of passing anonymous-typed values as template arguments (which happens when you use a value from the enum in e.g. EXPECT_EQ()), which is technically illegal in C++03, though we don't warn about it. Simply naming the enum would have done this, but in general naming enums used to declare constants like this is bizarre ("enum Constants { ... }"?). BUG=92247 TEST=Compiles Review URL: http://codereview.chromium.org/7817005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99087 0039d316-1c4b-4281-b951-d872f2087c98
* Create ipc.dll.darin@chromium.org2011-08-151-1/+3
| | | | | | Review URL: http://codereview.chromium.org/7633042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96820 0039d316-1c4b-4281-b951-d872f2087c98
* IPC: Increase MAX_DESCRIPTORS_PER_MESSAGEmseaborn@chromium.org2011-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This fixes the loading of Native Client's integrated runtime (IRT) library on Mac, because we need to send 5 descriptors in NaCl's startup IPC message on Mac. I am being conservative in only increasing MAX_DESCRIPTORS_PER_MESSAGE by 1 because it carries a storage cost (in Channel::ChannelImpl::input_cmsg_buf_) which is multiplied by the number of messages that can fit into Channel::kReadBufferSize, and the storage is allocated for the lifetime of the Channel. Note that I am not increasing the size of input_cmsg_buf_ under "#if defined(OS_MACOSX)" in ipc_channel_posix.h because it is already too small in the general case (see http://crbug.com/82829), but NaCl does not exercise this general case. BUG=http://code.google.com/p/nativeclient/issues/detail?id=1804 TEST=NaCl's "run_ppapi_core_browser_test irt=1" when run against Chromium Review URL: http://codereview.chromium.org/7010015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85617 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-261-0/+1
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: make sure that we never pass directory descriptors into the sandbox.agl@chromium.org2010-06-101-0/+3
| | | | | | | | BUG=43304 http://codereview.chromium.org/2733011/show git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49446 0039d316-1c4b-4281-b951-d872f2087c98
* First patch in making destructors of refcounted objects private.jam@chromium.org2009-11-051-1/+4
| | | | | | | BUG=26749 Review URL: http://codereview.chromium.org/360042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31136 0039d316-1c4b-4281-b951-d872f2087c98
* Split the IPC code into ipc/agl@chromium.org2009-07-221-0/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This splits the ipc code from the common project. The 'common' project pulls in all of webkit, the v8 bindings, skia, googleurl, and a number of other projects which makes it very difficult to deal with especially for external projects wanting just to use some of Chromium's infrastructure. This puts the ipc code into its top-level ipc/ directory with a dependency only on base. The common project depends on the new ipc/ipc.gyp:ipc target so that all projects currently pulling common in to get the IPC code still have it available. This mostly follows agl's pre-gyp attempt to do this which was r13062. Known issues: - Currently a number of projects depend on chrome/chrome.gyp:common in order to use the IPC infrastructure. Rather than fixing all of these dependencies I have made common depend on ipc/ipc.gyp:ipc and added "ipc" to the include_rules section of DEPS so that checkdeps.py doesn't complain. Over time projects that need IPC should depend on the IPC project themselves and dependencies on common removed, although I don't think many projects that need IPC will be able to get away without common currently. - ipc/ipc_message_macros.h still has #include "chrome/common/..." inside of a ipc/ should not refer to files in chrome/... now. I'm not sure how to resolve this since it's really an IDE bug - the named pipe name (windows+linux) and the logging event name (all) + env variable (posix) refer explicitly to 'Chrome' which somewhat hurts the illusion of ipc/ being an independent library. I think this should be examined in a subsequent, much smaller patch. - I've eliminated the IPC.SendMsgCount counter since it was implemented in a way to create a dependency from ipc/ to chrome/common/chrome_counters. This is the same approach that r13062 took. http://codereview.chromium.org/155905 (Patch from James Robinson) git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21342 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Move IPC code to ipc/"agl@chromium.org2009-04-031-108/+0
| | | | | | | This reverts commit r13062 which, unsurprisingly, broke the build. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13063 0039d316-1c4b-4281-b951-d872f2087c98
* Move IPC code to ipc/agl@chromium.org2009-04-031-0/+108
(No review URL: Rietvelt couldn't cope) git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13062 0039d316-1c4b-4281-b951-d872f2087c98