summaryrefslogtreecommitdiffstats
path: root/base/process_util_posix.cc
Commit message (Collapse)AuthorAgeFilesLines
* Mac: Remove some unneccesary IPC from fork_and_get_task.thakis@chromium.org2010-01-131-45/+0
| | | | | | | | | | | This was a left-over from the previous swap-bootstrap-port-based approach. BUG=13156 TEST=Open task manager. Should still work. Review URL: http://codereview.chromium.org/551004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36088 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: Other approach for IPCing child task_ts.thakis@chromium.org2010-01-121-1/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also move mach_ipc_mac to base, where it's now used. Based on http://www.foldr.org/~michaelw/log/2009/03/13/ , but uses a named connection instead. Do the IPC right after fork-time, so that the sandbox is not yet in effect. See the codereview comments for a benchmark that proves that this shouldn't be expensive, and for pros and cons for using a named connection vs temporarily switching out the bootstrap port. Works for worker processes too and seems more reliable in general. Measured perf impact in http://src.chromium.org/viewvc/chrome?view=rev&revision=35888 , it's negligible. BUG=13156 TEST=(requires that one enables the task manager in browser.cc) 1.) Open one tab that plays a youtube video 2.) Open a second and visit http://www.whatwg.org/demos/workers/primes/page.html 3.) Install e.g. the gmail checker extension 4.) Open the task manager It should report metrics for * one browser process * two renderer processes * one plugin process * one worker process * one extension process Check that %cpu etc more or less match what Activity Monitor displays if you filter for "Chromium". Also choose "Open all bookmarks" on the bookmarks bar with the task manager open and check that metrics for all tabs appear immediately. Review URL: http://codereview.chromium.org/549002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35977 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 35888 - Mac: Other approach for IPCing child task_ts.thakis@chromium.org2010-01-101-146/+0
| | | | | | | | | | | | | | | | | Based on http://www.foldr.org/~michaelw/log/2009/03/13/ , right now in proofofconcept quality. Works for worker processes too and seems more reliable in general. Makes it impossible to call LaunchApp() concurrently though. Next try: Submitting to get perf numbers, will revert. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=35883 Review URL: http://codereview.chromium.org/549002 TBR=thakis@chromium.org Review URL: http://codereview.chromium.org/536009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35890 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: Other approach for IPCing child task_ts.thakis@chromium.org2010-01-101-0/+146
| | | | | | | | | | | | | | Based on http://www.foldr.org/~michaelw/log/2009/03/13/ , right now in proof-of-concept quality. Works for worker processes too and seems more reliable in general. Makes it impossible to call LaunchApp() concurrently though. Next try: Submitting to get perf numbers, will revert. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=35883 Review URL: http://codereview.chromium.org/549002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35888 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 35883 - Mac: Other approach for IPCing child task_ts.thakis@chromium.org2010-01-101-143/+0
| | | | | | | | | | | | | | | Based on http://www.foldr.org/~michaelw/log/2009/03/13/ , right now in proofofconcept quality. Works for worker processes too and seems more reliable in general. Makes it impossible to call LaunchApp() concurrently though. Submitting to get perf numbers, will revert. Review URL: http://codereview.chromium.org/549002 TBR=thakis@chromium.org Review URL: http://codereview.chromium.org/544004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35884 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: Other approach for IPCing child task_ts.thakis@chromium.org2010-01-101-0/+143
| | | | | | | | | | | | Based on http://www.foldr.org/~michaelw/log/2009/03/13/ , right now in proof-of-concept quality. Works for worker processes too and seems more reliable in general. Makes it impossible to call LaunchApp() concurrently though. Submitting to get perf numbers, will revert. Review URL: http://codereview.chromium.org/549002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35883 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: stop zombie ps processes from being created.viettrungluu@chromium.org2010-01-041-10/+12
| | | | | | | | | | | | | | | This fixes two bugs: - the output buffer for the ps command being run could be too small (fix: buffer enlargened); and - if the output buffer was too small, waitpid() wouldn't be called (fix: always call waitpid(), obviously). BUG=31378 TEST=On a big, long-running Chrome/Chromium (with many processes, e.g., renderers), check that there are no zombie ps processes (with PPID the browser process); looking at about:memory may help speed up the creation of such zombies. Also, run the new test, ProcessUtilTest.GetAppOutputRestrictedNoZombies. Review URL: http://codereview.chromium.org/523033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35456 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 35025 - Revert 34994, maybe it regressed startup perf Fix cpu/memory ↵viettrungluu@chromium.org2009-12-191-47/+20
| | | | | | | | | | | | | | | | | | | measurements on OS X. Right now, this only works for the current process; support for child processes will be added in a later CL. BUG=13156,25454 TEST=Hook up task manager (connect menu item to commandDispatch:, give it the right tag). Stats for the browser process should now be right, and %cpu should be 0 (for now) for all other processes. Review URL: http://codereview.chromium.org/500118 TBR=thakis@chromium.org Review URL: http://codereview.chromium.org/504068 TBR=thakis@chromium.org Review URL: http://codereview.chromium.org/505056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35043 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 34994, maybe it regressed startup perf - Fix cpu/memory measurements ↵thakis@chromium.org2009-12-191-20/+47
| | | | | | | | | | | | | | | | on OS X. Right now, this only works for the current process; support for child processes will be added in a later CL. BUG=13156,25454 TEST=Hook up task manager (connect menu item to commandDispatch:, give it the right tag). Stats for the browser process should now be right, and %cpu should be 0 (for now) for all other processes. Review URL: http://codereview.chromium.org/500118 TBR=thakis@chromium.org Review URL: http://codereview.chromium.org/504068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35025 0039d316-1c4b-4281-b951-d872f2087c98
* Fix cpu/memory measurements on OS X.thakis@chromium.org2009-12-181-47/+20
| | | | | | | | | | | Right now, this only works for the current process; support for child processes will be added in a later CL. BUG=13156,25454 TEST=Hook up task manager (connect menu item to commandDispatch:, give it the right tag). Stats for the browser process should now be right, and %cpu should be 0 (for now) for all other processes. Review URL: http://codereview.chromium.org/500118 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34994 0039d316-1c4b-4281-b951-d872f2087c98
* Fix environment variables not being used after switching to ↵jam@chromium.org2009-11-231-6/+7
| | | | | | | | | | ChildProcessLauncher. BUG=28602 TEST=verified flash works on Mac Review URL: http://codereview.chromium.org/439005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32854 0039d316-1c4b-4281-b951-d872f2087c98
* posix: use PLOG to print useful error messagesevan@chromium.org2009-11-201-6/+3
| | | | | | | | Rather than printing errno, this macro prints useful error messages. Review URL: http://codereview.chromium.org/420006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32642 0039d316-1c4b-4281-b951-d872f2087c98
* Launch processes asynchronously so as not to block the UI thread. For now, ↵jam@chromium.org2009-11-181-4/+2
| | | | | | | | | renderer only, I'll take care of plugin/worker/utility processes in a followup change. (relanding 32203) BUG=6844 Review URL: http://codereview.chromium.org/397031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32264 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: Implement about:memory.viettrungluu@chromium.org2009-11-051-9/+49
| | | | | | | | | | | | | | | This implements about:memory on Mac. It calls /bin/ps to obtain information about processes (this is Apple's officially supported "API"). Unfortunately, ps provides fairly minimal information (rss and vsize); top is better, but not a stable API -- it has changed greatly between Mac OS 10.5 and 10.6, and moreover the 10.6 version is more limited in its output formatting. BUG=9653 TEST=Go to about:memory under a variety of conditions (with a variety of browsers loaded). Review URL: http://codereview.chromium.org/333008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31168 0039d316-1c4b-4281-b951-d872f2087c98
* Move console stack dumping code to a function so it can be reused in ↵maruel@chromium.org2009-10-271-58/+86
| | | | | | | | | | test_shell_tests. TEST=none BUG=13770 Review URL: http://codereview.chromium.org/339024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30220 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: change PIDs to base::ProcessId (or pid_t, as appropriate).viettrungluu@chromium.org2009-10-201-2/+2
| | | | | | | | | | | We probably want to discourage the use of ints for PIDs. This is a start; there are many other places where we should fix this. BUG=25272 TEST=none Review URL: http://codereview.chromium.org/300010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29511 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate all uses of strerror() in code that uses src/base. strerror() is ↵tschmelcher@chromium.org2009-10-131-3/+2
| | | | | | | | | | | inherently unsafe in multi-threaded apps because it stores the string in a global buffer. It should never be used. If you want to log an error, use PLOG and friends, or if that's too high-level then use safe_strerror(). TEST=built on Linux in 32-bit and 64-bit mode; ran base_unittests in each case; ran Chromium itself in each case; try servers BUG=none Review URL: http://codereview.chromium.org/261055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28850 0039d316-1c4b-4281-b951-d872f2087c98
* linux: implement GetCPUUsage() so the task manager shows CPUevan@chromium.org2009-09-191-5/+9
| | | | | | | | | | | | | Discussed in part here: http://groups.google.com/group/chromium-dev/browse_thread/thread/8e91f66f9af6ccec This implements option 3, which turned out to be pretty simple. BUG=19864 Review URL: http://codereview.chromium.org/215020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26647 0039d316-1c4b-4281-b951-d872f2087c98
* posix: trivial error message cleanupevan@chromium.org2009-09-121-1/+1
| | | | | | Review URL: http://codereview.chromium.org/195073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26064 0039d316-1c4b-4281-b951-d872f2087c98
* posix: better launchapp error messageevan@chromium.org2009-09-091-2/+2
| | | | | | | | Random cleanup done in part of an unrelated change. Review URL: http://codereview.chromium.org/195045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25790 0039d316-1c4b-4281-b951-d872f2087c98
* When forking, restore the default exception handler port.mark@chromium.org2009-09-031-0/+8
| | | | | | | | | | | | | | | | | | | | | The browser process launches children with fork && exec. On the Mac, this results in a child that has its exception ports set the same as the parent. When Breakpad is enabled, this means that a child such as a renderer process begins its life with its exception port pointing to a Breakpad instance running inside the browser. This is not intended. Even if the child installs its own Breakpad handler (which a renderer would), the previous handler would be pointing to the instance inside the browser, and if the child's Breakpad is misconfigured to pass exceptions to the previous handler it will wind up being passed back to the parent. The misconfiguration was corrected in r25311. This change restores the default exception handler port, which should be Apple Crash Reporter/ReportCrash, in the child process immediately after it it has been forked. BUG=20371 TEST=None, because r25311 fixed the visible aspect of this bug Review URL: http://codereview.chromium.org/200007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25371 0039d316-1c4b-4281-b951-d872f2087c98
* Port some of the base module to FreeBSD. Extracted fromwtc@chromium.org2009-08-311-1/+4
| | | | | | | | | | | | | | http://codereview.chromium.org/172032. The patch is contributed by Ben Laurie of Google. Original review URL: http://codereview.chromium.org/180037 R=wtc BUG=none TEST=none Review URL: http://codereview.chromium.org/183016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24950 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r23911, which switched from fork to vfork().deanm@chromium.org2009-08-211-28/+22
| | | | | | | | | | | | | Everything still worked correctly, but our performance bots didn't measure any improvements. Perhaps I just ended up measuring the dtrace overhead of fork vs vfork. BUG=19863 Review URL: http://codereview.chromium.org/174229 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23969 0039d316-1c4b-4281-b951-d872f2087c98
* Switch to using vfork() instead of fork() when we can.deanm@chromium.org2009-08-201-22/+28
| | | | | | | | | | | | | | | | This means we can avoid creating new page tables, but that we share our memory mappings / stack with the parent. This is a bit more fragile, but should be workable. This saves us some work since we are just going to exec(). This also removes some sandbox unsetting code, since we shouldn't be spawning processing under the sandbox anyway. BUG=19863 Review URL: http://codereview.chromium.org/173141 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23911 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the Mac-specific implementation of LaunchApp, and share the Linux ↵stuartmorgan@google.com2009-08-061-0/+76
| | | | | | | | | | | | | version. Fixes a race condition with file descriptors, and gives the Mac access to the environment-alterning version of LaunchApp BUG=11174 TEST=Launching render/plugin/utility processes should still work on the Mac Review URL: http://codereview.chromium.org/165067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22649 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Use _exit() instead of exit() in the child after fork() in failure ↵mdm@chromium.org2009-07-231-0/+5
| | | | | | | | | | | conditions. TEST=none BUG=none Review URL: http://codereview.chromium.org/159275 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21418 0039d316-1c4b-4281-b951-d872f2087c98
* Linux/Mac: Use _exit() instead of exit() in the child after fork() in ↵mdm@chromium.org2009-07-221-3/+3
| | | | | | | | | | | failure conditions. BUG=17329 TEST=none Review URL: http://codereview.chromium.org/159201 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21294 0039d316-1c4b-4281-b951-d872f2087c98
* Fix KillProcess so it doesn't report everything as a failure.stuartmorgan@chromium.org2009-07-131-4/+11
| | | | | | | | BUG=none TEST=UI tests on Mac should no longer all log that kills are failing. Review URL: http://codereview.chromium.org/155297 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20566 0039d316-1c4b-4281-b951-d872f2087c98
* Fix tools/valgrind/chrome_tests.sh to always use --log-file optiondank@chromium.org2009-07-071-0/+6
| | | | | | | | | | | | | | | so fork() doesn't corrupt log files; lets --generate_suppressions work even with the hacky valgrind fix that makes anything but --log-file crash on child of fork(). Also avoid killing user desktop session if zygote dies! BUG=none, but related to fix for http://crbug.com/15771 TEST=patch valgrind with fork workaround; sh tools/valgrind/chrome_tests.sh --generate_suppressions -t ui logs you out on linux without this. Review URL: http://codereview.chromium.org/155130 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20024 0039d316-1c4b-4281-b951-d872f2087c98
* Consistently use int64 for integers holding number of milliseconds.phajdan.jr@chromium.org2009-06-171-6/+6
| | | | | | | | | | This applies only to things which use TimeDelta::InMilliseconds, because it returns int64. Before this patch callers static_casted that to int, and after this patch they use the returned value as int64. Review URL: http://codereview.chromium.org/126279 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18626 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: read subprocess output before waiting for termination.agl@chromium.org2009-06-101-8/+7
| | | | | | | | | | | | | Previously, GetAppOutput was designed only for fuser. However, it appears that Mac is using it to read the output of ps: which outputs rather more. In this case, ps can fill up the pipe buffer while we are waiting for it to exit, leading to deadlock depending on how many other process are running on the system at the time. http://codereview.chromium.org/118514 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18068 0039d316-1c4b-4281-b951-d872f2087c98
* CloseSuperfluousFiles shouldn't close the directory it's reading fromdkegel@google.com2009-06-071-0/+3
| | | | | | | | | BUG=none TEST=none (found with strace while running e.g. ProcessUtilTest.FDRemapping) Review URL: http://codereview.chromium.org/115720 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17847 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes a bug where we were inadvertently closing Valgrind-owned FDsrohitrao@chromium.org2009-05-061-23/+30
| | | | | | | | | | | when running under Valgrind. TEST=None http://crbug.com/11412 Review URL: http://codereview.chromium.org/108042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15414 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: Add a macro for handling EINTR.agl@chromium.org2009-05-011-25/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On POSIX systems, system calls can be interrupted by signals. In this case, they'll return EINTR, indicating that the system call needs to be restarted. (The situation is a little more complicated than this with SA_RESTART, but you can read man 7 signal if you like.) The short of it is that you need to catch EINTR and restart the call for these system calls: * read, readv, write, writev, ioctl * open() when dealing with a fifo * wait* * Anything socket based (send*, recv*, connect, accept etc) * flock and lock control with fcntl * mq_ functions which can block * futex * sem_wait (and timed wait) * pause, sigsuspend, sigtimedwait, sigwaitinfo * poll, epoll_wait, select and 'p' versions of the same * msgrcv, msgsnd, semop, semtimedop * close (although, on Linux, EINTR won't happen here) * any sleep functions (careful, you need to handle this are restart with different arguments) We've been a little sloppy with this until now. This patch adds a macro for dealing with this and corrects every case of these system calls (that I found). The macro is HANDLE_EINTR in base/eintr_wrapper.h. It's safe to include on Windows and is a no-op there. On POSIX, it uses GCC magic to return the correct type based on the expression and restarts the system call if it throws EINTR. And you can use it like: HANDLE_EINTR(close(fd)); Or: ssize_t bytes_read = HANDLE_EINTR(read(fd, buffer, len)); *BEWARE* that it will evaluate the argument multiple times, so this is not safe: HANDLE_EINTR(close(FireMissiles())); http://groups.google.com/group/chromium-dev/browse_thread/thread/41a35b2a457d73a0 http://codereview.chromium.org/100225 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15102 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: Add code for shuffling file descriptors.agl@chromium.org2009-04-301-13/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | When forking a child process, one often wants to move existing file descriptors to well known locations (stdout, stderr etc). However, this is a process bedeviled with corner cases. Consider the case where you open two file descriptors, get assigned fds 1 and 0 for them and wish to shuffle them so that they end up in slots 0 and 1. Our current code fails in this case. We also have a problem where we're currently trying to mark file descriptors as close-on-exec rather than closing them in the child process. This is inherently broken in a multithreaded process where another thread can open a file descriptor and race the loop which is trying to mark them. Thus, on Linux we switch to close-after-fork where we known that no other threads exist in the process. On Mac, the code is sufficiently different that this simple fix isn't applicable and one of the Mac folks will need to take a look. http://codereview.chromium.org/100127 BUG=11174 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14978 0039d316-1c4b-4281-b951-d872f2087c98
* Make task_manager_resource_providers.cc compile on POSIX.phajdan.jr@chromium.org2009-04-301-0/+6
| | | | | | | | TEST=Make sure that the task manager isn't obviously broken on Windows. Review URL: http://codereview.chromium.org/93067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14934 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: don't spawn zombies.agl@chromium.org2009-04-281-10/+23
| | | | | | | | | http://codereview.chromium.org/93147 BUG=9401 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14705 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r14620 which was a rollback of r14549 and r14508. Thistc@google.com2009-04-271-2/+7
| | | | | | | | | | | | change re-enables the ui tests. Since jam re-enabled some tests, I had to #ifdef around 4 tests that are not shutting down cleanly on linux. It looks like we have renderers that aren't shutting down properly (pegged at 100% cpu). Review URL: http://codereview.chromium.org/100061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14680 0039d316-1c4b-4281-b951-d872f2087c98
* Speculatively roll back r14549 and r14508. The chrome browsertc@google.com2009-04-271-7/+2
| | | | | | | | | | | | process is pegged at 100% cpu after ui_tests has exited. Seeing if this is the cause. Will re-roll forward if it's not. TBR=estade Review URL: http://codereview.chromium.org/100047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14620 0039d316-1c4b-4281-b951-d872f2087c98
* Port unload_uitest.cc and enable some of the tests on linux.estade@chromium.org2009-04-241-2/+7
| | | | | | | | Make WaitForSingleProcess respect base::kNoTimeout (which is equivalent to INFINITE on windows). Review URL: http://codereview.chromium.org/99008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14508 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "POSIX: Don't spawn zombies." (r14488)agl@chromium.org2009-04-241-14/+3
| | | | | | | | Something else is trying to reap children in the ui_tests and causing a mess. Reverting since it's a Friday night. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14499 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: Don't spawn zombies.agl@chromium.org2009-04-241-3/+14
| | | | | | | | TEST=Navigate to several different sites and check that no Chrome zombies are roaming around. BUG=9401 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14488 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of variable length arrays.willchan@chromium.org2009-04-241-2/+2
| | | | | | Review URL: http://codereview.chromium.org/92005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14440 0039d316-1c4b-4281-b951-d872f2087c98
* More solid detection of browser process in chrome_process_util_linux.cc:phajdan.jr@chromium.org2009-04-211-2/+8
| | | | | | | | | | | | | | | | - use GetAppOutput instead of popen - make unexpected conditions fatal (otherwise the tests using this code would mistakenly assume that there is no running browser process) Also add a constant for SingletonSocket. Make necessary adjustments to GetAppOutput - ignore stderr (because fuser prints the file name to stderr and having stderr in |output| would require more parsing). Review URL: http://codereview.chromium.org/77031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14091 0039d316-1c4b-4281-b951-d872f2087c98
* Add GetAppOutput function, a better replacement for popen.phajdan.jr@chromium.org2009-04-171-0/+68
| | | | | | | | | | | | It will replace popen call in chrome_process_util_linux. I don't see much benefit in having a Windows implementation (not many useful programs you can launch and get output), so POSIX-only. Review URL: http://codereview.chromium.org/67226 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13920 0039d316-1c4b-4281-b951-d872f2087c98
* Make OpenProcessHandle report an error when it couldn't open the handle.phajdan.jr@chromium.org2009-04-031-2/+3
| | | | | | | | One more step to land http://codereview.chromium.org/54003 (chrome_process_util). Review URL: http://codereview.chromium.org/62004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13086 0039d316-1c4b-4281-b951-d872f2087c98
* Use portable typedef for PIDs (process IDs).phajdan.jr@chromium.org2009-04-011-3/+3
| | | | | | | | | This is a preparation to land http://codereview.chromium.org/54003, which replaces chrome_process_filter with more portable chrome_process_util. Review URL: http://codereview.chromium.org/57062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12948 0039d316-1c4b-4281-b951-d872f2087c98
* Removed unneeded includes of base/scoped_ptr.h. Reduce usage from ~800 files ↵thestig@chromium.org2009-03-131-0/+1
| | | | | | | | to ~400. Review URL: http://codereview.chromium.org/46039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11651 0039d316-1c4b-4281-b951-d872f2087c98
* Make CrashAwareSleep more accurate on POSIX (checking if the process exists).phajdan.jr@chromium.org2009-03-061-8/+20
| | | | | | Review URL: http://codereview.chromium.org/39185 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11103 0039d316-1c4b-4281-b951-d872f2087c98
* Make startup_tests build and run on Linux (except reference tests).phajdan.jr@chromium.org2009-03-051-1/+1
| | | | | | Review URL: http://codereview.chromium.org/27240 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10978 0039d316-1c4b-4281-b951-d872f2087c98