Gennady Bystritsky wrote:
logfile = "my_log_file.log"
pid = fork do
File.open(logfile, 'w') do |_io|
$stdout.reopen(_io)
$stderr.reopen(_io)
endProcess.setsess # In this scenario disassociates the controlling
# terminal until another tty device is open (will
# become new controlling tty).exec "the_command_line_used_to_be_launched_by_system"
endProcess.waitpid pid
Process.setsess should be Process.setsid. Sorry for confusion, clicked
on 'Send' too soon ;-).
···
===
Gennady.