def self.pid_active?(pid) begin Process.getpgid(pid.to_i) true rescue NotImplementedError true rescue Exception false endend