god icon indicating copy to clipboard operation
god copied to clipboard

Prevent from starts two processes

Open mashiro opened this issue 11 years ago • 8 comments

# 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

mashiro avatar Apr 18 '13 10:04 mashiro

Interesting idea. Can you paste what the w.start command was?

eric avatar Apr 18 '13 15:04 eric

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

mashiro avatar Apr 18 '13 16:04 mashiro

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?

eric avatar Jun 03 '13 18:06 eric

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?

jnewland avatar Jun 03 '13 18:06 jnewland

I'm still running 1.8.7, so I am definitely interested in backwards compatibility.

eric avatar Jun 03 '13 18:06 eric

@eric Considering 1.8.7 is now completely end-of-lifed, do you still care about backwards compatibility on this?

rtyler avatar Feb 24 '14 22:02 rtyler

Yes, I would like to keep 1.8.7 for now. It still is the ruby that we run god with.

eric avatar Feb 24 '14 22:02 eric

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)

skull-squadron avatar Feb 27 '14 00:02 skull-squadron