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

Unified Diff: scripts/slave/recipe_modules/goma/resources/cloudtail_utils.py

Issue 2375843005: Stop redirect stdout/stderr and remove close_fds=True (Closed)
Patch Set: use raw_io for file Created 4 years, 3 months 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
Index: scripts/slave/recipe_modules/goma/resources/cloudtail_utils.py
diff --git a/scripts/slave/recipe_modules/goma/resources/cloudtail_utils.py b/scripts/slave/recipe_modules/goma/resources/cloudtail_utils.py
index ea3c619976c857f27e66c2cefcae7b6e454e78dc..2f22dd39295b423bb3c08be7185d9bc24e23f6ce 100644
--- a/scripts/slave/recipe_modules/goma/resources/cloudtail_utils.py
+++ b/scripts/slave/recipe_modules/goma/resources/cloudtail_utils.py
@@ -20,13 +20,9 @@ def start_cloudtail(args):
'tail',
'--log-id', 'goma_compiler_proxy',
'--path',
- goma_utils.GetLatestGomaCompilerProxyInfo()],
- stdout=open(os.devnull, 'w'),
- stderr=open(os.devnull, 'w'),
- close_fds=True)
-
- sys.stdout.write(str(proc.pid))
-
+ goma_utils.GetLatestGomaCompilerProxyInfo()])
+ with open(args.pid_file, 'w') as f:
+ f.write(str(proc.pid))
def main():
parser = argparse.ArgumentParser(
@@ -39,6 +35,8 @@ def main():
parser_start.set_defaults(command='start')
parser_start.add_argument('--cloudtail-path', required=True,
help='path of cloudtail binary')
+ parser_start.add_argument('--pid-file', required=True,
+ help='file written pid')
parser_stop = subparsers.add_parser('stop',
help='subcommand to stop cloudtail')

Powered by Google App Engine
This is Rietveld 408576698