The problem is that background simply nohup and backgrounds the process using the shell's job control &. More often than not, badly behaved daemons still block.
There's many hoops to jump through to ensure that your process behaves well when backgrounded, forked, nohupped, etc - and we can't whitelist programs that do it well, and blacklist those that can't.
Discussion is welcome, but I do think that background() should be removed from the DSL.
sshkit/lib/sshkit/backends/abstract.rb
Line 59 in 6c81f53
The problem is that background simply
nohupand backgrounds the process using the shell's job control&. More often than not, badly behaved daemons still block.There's many hoops to jump through to ensure that your process behaves well when backgrounded, forked, nohupped, etc - and we can't whitelist programs that do it well, and blacklist those that can't.
Discussion is welcome, but I do think that
background()should be removed from the DSL.