Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(797)

Unified Diff: build/android/pylib/cmd_helper.py

Issue 54123005: android: Add screen recording tool (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: -f instead of -o Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/android_commands.py ('k') | build/android/pylib/screenshot.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/cmd_helper.py
diff --git a/build/android/pylib/cmd_helper.py b/build/android/pylib/cmd_helper.py
index bce3f97e6598268418341fb8cb128d14b5c6ac6a..dba399f8193f333ebcc94a880cb540ba83d90976 100644
--- a/build/android/pylib/cmd_helper.py
+++ b/build/android/pylib/cmd_helper.py
@@ -14,13 +14,20 @@ import tempfile
import constants
-def Call(args, stdout=None, stderr=None, shell=None, cwd=None, env=None):
- return subprocess.call(
+def Popen(args, stdout=None, stderr=None, shell=None, cwd=None, env=None):
+ return subprocess.Popen(
args=args, cwd=cwd, stdout=stdout, stderr=stderr,
shell=shell, close_fds=True, env=env,
preexec_fn=lambda: signal.signal(signal.SIGPIPE, signal.SIG_DFL))
+def Call(args, stdout=None, stderr=None, shell=None, cwd=None, env=None):
+ pipe = Popen(args, stdout=stdout, stderr=stderr, shell=shell, cwd=cwd,
+ env=env)
+ pipe.communicate()
+ return pipe.wait()
+
+
def RunCmd(args, cwd=None):
"""Opens a subprocess to execute a program and returns its return value.
« no previous file with comments | « build/android/pylib/android_commands.py ('k') | build/android/pylib/screenshot.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698