summaryrefslogtreecommitdiffstats
path: root/chrome/tools
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-13 18:10:48 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-13 18:10:48 +0000
commite5368488e2fdad1cf27d6c0fd1031769affbaa5e (patch)
treeeba0c62eef2a9d4065955d7f612bdc3839387e91 /chrome/tools
parent304b0e350dbadef7d1d418fcd17ef42c922612ca (diff)
downloadchromium_src-e5368488e2fdad1cf27d6c0fd1031769affbaa5e.zip
chromium_src-e5368488e2fdad1cf27d6c0fd1031769affbaa5e.tar.gz
chromium_src-e5368488e2fdad1cf27d6c0fd1031769affbaa5e.tar.bz2
Run worker processes via the zygote.
The following tests fail when using the SUID sandbox because they try to count processes and the extra sandbox processes throw them off. They pass with this patch so long as the SUID sandbox isn't invoked (which is the case on the builders): WorkerTest.FLAKY_MultipleTabsQueuedSharedWorker WorkerTest.FLAKY_LimitPerPage WorkerTest.WorkerClose WorkerTest.QueuedSharedWorkerShutdown WorkerTest.FLAKY_QueuedSharedWorkerStartedFromOtherTab Note that this patch doesn't trigger the seccomp sandbox for worker processes. That will have to wait for another CL. BUG=54794 TEST=ui_tests http://codereview.chromium.org/3312021/show git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59242 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/tools')
-rwxr-xr-xchrome/tools/chrome-process-identifier.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/tools/chrome-process-identifier.sh b/chrome/tools/chrome-process-identifier.sh
index c12aedb..f7ec283 100755
--- a/chrome/tools/chrome-process-identifier.sh
+++ b/chrome/tools/chrome-process-identifier.sh
@@ -52,7 +52,8 @@ identify() {
foundzygote=0
for child in $(ps h --format pid --ppid $1); do
cmd="$(xargs -0 </proc/$child/cmdline|sed 's/ -/\n-/g')" 2>/dev/null
- case "$(echo "$cmd" | sed 's/--type=//;t1;d;:1;q')" in
+ type="$(echo "$cmd" | sed 's/--type=//;t1;d;:1;q')"
+ case $type in
'')
echo "Process $child is part of the browser"
identify "$child"
@@ -67,19 +68,19 @@ identify() {
echo "Process $child is a \"$plugin\" plugin"
identify "$child"
;;
- renderer)
+ renderer|worker)
# The seccomp sandbox has exactly one child process that has no other
# threads. This is the trusted helper process.
- seccomp="$(ps h --format pid --ppid $child)"
+ seccomp="$(ps h --format pid --ppid $child|xargs)"
if [ $(echo "$seccomp" | wc -w) -eq 1 ] &&
[ $(ls /proc/$seccomp/task 2>/dev/null | wc -w) -eq 1 ] &&
ls -l /proc/$seccomp/exe 2>/dev/null | egrep -q '/chrome$'; then
- echo -n "Process $child is a sandboxed renderer (seccomp helper:" \
+ echo -n "Process $child is a sandboxed $type (seccomp helper:" \
"$seccomp)"
[ -d /proc/$child/cwd/. ] || echo -n "; setuid sandbox is active"
echo
else
- echo -n "Process $child is a renderer"
+ echo -n "Process $child is a $type"
[ -d /proc/$child/cwd/. ] || echo -n "; setuid sandbox is active"
echo
identify "$child"
@@ -91,7 +92,6 @@ identify() {
identify "$child"
;;
*)
- type="$(echo "$cmd" | sed 's/--type=//;t1;d;:1;q')"
echo "Process $child is of unknown type \"$type\""
identify "$child"
;;