Class: Builtins::Background
Constant Summary
collapse
- DEFAULT_SHELL =
"bash"
- DEFAULT_LOG_FILE_PREFIX =
"/tmp/ops_bglog_"
Instance Attribute Summary
Attributes inherited from Builtin
#args, #config
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Builtin
class_for, #initialize
Constructor Details
This class inherits a constructor from Builtin
Class Method Details
.description ⇒ Object
11
12
13
|
# File 'lib/builtins/background.rb', line 11
def description
"runs the given command in a background session"
end
|
.log_filename ⇒ Object
15
16
17
|
# File 'lib/builtins/background.rb', line 15
def log_filename
"#{log_filename_prefix}#{Ops.project_name}"
end
|
Instance Method Details
#run ⇒ Object
26
27
28
29
30
31
32
|
# File 'lib/builtins/background.rb', line 26
def run
subprocess = fork do
run_ops(args)
end
Process.detach(subprocess)
end
|