Compatibilite avec Nectaris
darcs-hash:20050104160119-d1718-280a6138b0a599c203aecd898bd0dc6a8c840966.gz
This commit is contained in:
parent
6d0ff951d1
commit
13e14194c9
1 changed files with 2 additions and 2 deletions
|
@ -77,13 +77,13 @@ def make_lock(lock_name, lock_comment='',nowait=1, quiet=False) :
|
|||
fd.close()
|
||||
|
||||
# Informations sur le processus lockant
|
||||
if os.system( "ps %s > /dev/null 2>&1" % pid ) :
|
||||
if os.system( "ps ax | grep -q '^%s '" % pid ) :
|
||||
# Le script lockant ne tourne plus
|
||||
os.remove(lock_file)
|
||||
elif nowait :
|
||||
if not quiet:
|
||||
sys.stderr.write('Lock : %s\n' % lock_file)
|
||||
l=getoutput('ps -o etime --no-headers %s' % pid)
|
||||
l=getoutput("ps -ax -o pid,etime | awk '($1 == %s)'" % pid)
|
||||
data = [ user , pid , l.strip() ]
|
||||
|
||||
# Formatate de etime
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue