From 1bbbf658decf8a86aa2cdb93ea45829a934d17f0 Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Fri, 18 Nov 2016 09:07:23 -0800 Subject: [PATCH] [report] Fix report script and inherit std file descriptors when invoking Reviewed By: jvillard Differential Revision: D4204865 fbshipit-source-id: 2a0ea7e --- infer/lib/python/report.py | 4 ++-- infer/src/backend/infer.ml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/infer/lib/python/report.py b/infer/lib/python/report.py index 57920e75a..3b39d4e8b 100755 --- a/infer/lib/python/report.py +++ b/infer/lib/python/report.py @@ -40,8 +40,8 @@ def main(): sys_argv = map(utils.decode, sys.argv) args = arg_parser.parse_args(sys_argv[1:]) bugs_out = os.path.join(args.results_dir, config.BUGS_FILENAME) - issues.print_and_save_errors(args.project_root, args.issues_json, bugs_out, - args.pmd_xml) + issues.print_and_save_errors(args.results_dir, args.project_root, + args.issues_json, bugs_out, args.pmd_xml) if __name__ == '__main__': main() diff --git a/infer/src/backend/infer.ml b/infer/src/backend/infer.ml index b7f8e0215..96459d3cb 100644 --- a/infer/src/backend/infer.ml +++ b/infer/src/backend/infer.ml @@ -244,7 +244,7 @@ let report () = "--project-root"; Config.project_root; "--results-dir"; Config.results_dir ] in - Unix.waitpid (Unix.create_process ~prog ~args).pid |> ignore + Unix.waitpid (Unix.fork_exec ~prog ~args:(prog :: args) ()) |> ignore let analyze = function | Buck when Config.use_compilation_database = None ->