If I’ve got a Ruby program, and I only want one instance of it to be able to run at a time, what are best[1] ways of accomplishing that? I’ve tried Googling but it thinks I’m looking for singleton-related information making it hard to find what I’m actually looking for.
[1] best= shortest, simplest, self-explanitory, doesn’t require extra gems
From http://rosettacode.org/wiki/Determine_if_only_one_instance_is_running#Ruby