Fix obsolete function call (File.exists?)
This commit is contained in:
parent
1c71ee6227
commit
63926d5e86
1 changed files with 2 additions and 1 deletions
|
@ -242,7 +242,7 @@ module Qasim
|
|||
# test if the other process still exist
|
||||
masterpid = File.read(lockfname).strip
|
||||
other_path = "/proc/#{masterpid.to_i}"
|
||||
if File.exists? other_path then
|
||||
if File.exist? other_path then
|
||||
cmdline = File.read( File.join( other_path, 'cmdline' ) )
|
||||
if cmdline =~ /qasim/ then
|
||||
raise LockError, "Another instance of %s is already running." % APP_NAME
|
||||
|
@ -271,6 +271,7 @@ module Qasim
|
|||
#
|
||||
def run
|
||||
lock_set
|
||||
Process.daemon(true)
|
||||
@app.exec
|
||||
exit 0
|
||||
rescue LockError
|
||||
|
|
Loading…
Reference in a new issue