diff --git a/xprof/xprof.rb.in b/xprof/xprof.rb.in index f1c0310d..c2cab278 100755 --- a/xprof/xprof.rb.in +++ b/xprof/xprof.rb.in @@ -748,9 +748,8 @@ def trace_and_on_node_processing(usr_argv) if OPTIONS[:archive] LOGGER.debug("Waiting for babeltrace_thapi and dirwatch (#{pids}) to finish") pids.each do |pid| - Process.wait(pid) - XprofExitCode.update($?.exitstatus) - Logger.warn("#{pid} failed") unless $?.success? + _, status = Process.wait2(pid) + XprofExitCode.update(status, "babeltrace_thapi or dirwatch #{pid}") end end # we can kill the session daemon