module PidModule
Public Instance Methods
exist_pid_file?(pidfile)
click to toggle source
for test
# File vendor/qwik/lib/qwik/util-pid.rb, line 26 def exist_pid_file?(pidfile) return pidfile.path.exist? end
read_pid_file(pidfile)
click to toggle source
# File vendor/qwik/lib/qwik/util-pid.rb, line 13 def read_pid_file(pidfile) pid = nil pid = pidfile.path.get_first.chomp.to_i return pid end
remove_pid_file(pidfile)
click to toggle source
# File vendor/qwik/lib/qwik/util-pid.rb, line 19 def remove_pid_file(pidfile) if Process.pid == read_pid_file(pidfile) pidfile.path.unlink end end
write_pid_file(pidfile)
click to toggle source
# File vendor/qwik/lib/qwik/util-pid.rb, line 9 def write_pid_file(pidfile) pidfile.path.put("#{Process.pid}\n") end