-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Daemonized remote process connected to STDOUT/STDERR causes sshkit to hang in loop #122
Comments
Interesting idea the Ruby gem has of "daemonized", please see the discussion of what daemonization really means at capistrano/capistrano#966. |
@leehambley I know it's really the fault of daemonize but this is something that keeps happening and there's a lot of bad behaved programs out there (I had to get one of the devs in my team to fix exactly this behaviour yesterday - long sermon on proper *ix daemonization inclusive. |
It would depend on what the patched ended up looking like, and how well it was functionally tested, based on the capistrano/vm. But, in theory yes. I spent the last few years trying to find a knowledge war about badly behaved programs, and I'm not keen to do the same again. I also rarely see the use-case for starting daemons via Cap. (Surely, you'd want them monitored, and started by the system, and you would instruct the system to start them, using monit, god, bluepill, initd, runit, daemontools, initd, etc?) But the long running badly behaved daemons argument has been ongoing for 20 years in linux, and people are still doing it wrong. |
I just checked the docs for
Issue closed, people need to |
I have a command on my remote server that daemonizes without disconnecting the output (using ruby's
Process.daemon(true, true)
), and continues writing to STDOUT after being daemonized. For demonstration purposes, here is my script:Once the process exits and sshkit gets an exit status code, I would expect it to stop paying attention to the command, but it doesn't.
This is the root cause behind 9z0b3t1c/capistrano-resque#80
The text was updated successfully, but these errors were encountered: