| 27 | } |
| 28 | |
| 29 | void ProcessorBase::setup_redirection(int my_num, int thread_num, |
| 30 | OnlineOptions& opts, SwitchableOutput& out, bool real) |
| 31 | { |
| 32 | // only output on party 0 if not interactive |
| 33 | bool always_stdout = opts.cmd_private_output_file == "."; |
| 34 | bool output = my_num == 0 or opts.interactive or always_stdout; |
| 35 | output &= real or always_stdout; |
| 36 | out.activate(output); |
| 37 | |
| 38 | if (not (opts.cmd_private_output_file.empty() or always_stdout)) |
| 39 | { |
| 40 | const string stdout_filename = get_parameterized_filename(my_num, |
| 41 | thread_num, opts.cmd_private_output_file); |
| 42 | stdout_redirect_file.open(stdout_filename.c_str(), ios_base::out); |
| 43 | out.redirect_to_file(stdout_redirect_file); |
| 44 | } |
| 45 | } |
no test coverage detected