Class: PodsOrz::ProcessOperator
- Inherits:
-
Object
- Object
- PodsOrz::ProcessOperator
- Defined in:
- lib/podsorz/util/process_operator.rb
Class Method Summary collapse
Class Method Details
.already_in_process ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/podsorz/util/process_operator.rb', line 5 def self.already_in_process is_in_process = false Open3.popen3("ps aux | grep \<podsorz\> -c") do |stdin , stdout , stderr, wait_thr| while line = stdout.gets if line.rstrip.to_i > 2 is_in_process = true break end end end is_in_process end |