god
god copied to clipboard
Prevent from starts two processes
# before
sh -c ruby -e 'loop { p ARGV; sleep 1; }' 'foo bar'
\_ ruby -e loop { p ARGV; sleep 1; } foo bar
# after
ruby -e loop { p ARGV; sleep 1; } foo bar
Interesting idea. Can you paste what the w.start
command was?
I used this config.
God.watch do |w|
w.name = 'test'
w.start = "ruby -e 'loop { p ARGV; sleep 1; }' 'foo bar'"
w.keepalive
end
I'm a little bit scared to change this, but it definitely is something that has hurt people in the past.
Any opinions @mojombo, @jnewland, @tmm1?
Oh wow, I had never seen Shellwords before. Amazing. This would definitely address a long-standing wart in God. I'm sure there are edge cases in Shellwords, though. Unsure how to test for those.
Looks like the API is a bit different between 1.8.7 and 1.9.3. Is backwards compat still a thing we care about here?
I'm still running 1.8.7, so I am definitely interested in backwards compatibility.
@eric Considering 1.8.7 is now completely end-of-lifed, do you still care about backwards compatibility on this?
Yes, I would like to keep 1.8.7 for now. It still is the ruby that we run god with.
Lots of shops are still running 1.8.7 (REE) in production b/c change is risk and doesn't have an immediate payoff. (Rant: A maintainer strategy for handling FOSS deprecations)