Class: Launchy::Detect::Runner::Forkable
- Inherits:
-
Launchy::Detect::Runner
- Object
- Launchy::Detect::Runner
- Launchy::Detect::Runner::Forkable
- Defined in:
- lib/launchy/detect/runner.rb
Instance Attribute Summary collapse
-
#child_pid ⇒ Object
readonly
Returns the value of attribute child_pid.
Instance Method Summary collapse
Methods inherited from Launchy::Detect::Runner
#commandline_normalize, detect, #dry_run, #run, #shell_commands
Methods included from Launchy::DescendantTracker
#children, #find_child, #inherited
Instance Attribute Details
#child_pid ⇒ Object (readonly)
Returns the value of attribute child_pid.
117 118 119 |
# File 'lib/launchy/detect/runner.rb', line 117 def child_pid @child_pid end |
Instance Method Details
#wet_run(cmd, *args) ⇒ Object
119 120 121 122 123 124 125 126 127 |
# File 'lib/launchy/detect/runner.rb', line 119 def wet_run( cmd, *args ) @child_pid = fork do close_file_descriptors unless Launchy.debug? Launchy.log("wet_run: before exec in child process") exec_or_raise( cmd, *args ) exit! end Process.detach( @child_pid ) end |