
October 25th, 2012, 01:08 PM
|
|
Registered User
|
|
Join Date: Oct 2012
Posts: 5
Time spent in forums: 1 h 15 m 36 sec
Reputation Power: 0
|
|
|
Beginner Ruby question
Hi
I am trying to determine if a process is running or not using this code. What is the right way to do this? Here is my attempt
[1] pry(main)> if Process.getpgid(89707) !=1
[1] pry(main)* puts "it got killed"
[1] pry(main)* else
[1] pry(main)* puts "it did not get killed"
[1] pry(main)* end
Errno::ESRCH: No such process
from (pry):1:in `getpgid'
|