Module: Evilution::ChildOutput Private
- Defined in:
- lib/evilution/child_output.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Class Attribute Summary collapse
- .log_dir ⇒ Object private
Class Method Summary collapse
-
.redirect! ⇒ Object
private
Per-run truncation happens once in the parent (Runner#configure_child_output); within a run, multiple forks reusing the same PID (pool worker recycle, per-mutation forks) append so cross-fork output isn't lost.
Class Attribute Details
.log_dir ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
9 10 11 |
# File 'lib/evilution/child_output.rb', line 9 def log_dir @log_dir end |
Class Method Details
.redirect! ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Per-run truncation happens once in the parent (Runner#configure_child_output); within a run, multiple forks reusing the same PID (pool worker recycle, per-mutation forks) append so cross-fork output isn't lost.
15 16 17 18 19 20 21 22 23 |
# File 'lib/evilution/child_output.rb', line 15 def redirect! return unless log_dir pid = Process.pid $stdout.reopen(File.join(log_dir, "#{pid}.out"), "a") $stderr.reopen(File.join(log_dir, "#{pid}.err"), "a") $stdout.sync = true $stderr.sync = true end |