|
From: <fcr...@us...> - 2013-01-01 06:11:46
|
Revision: 832
http://safekeep.svn.sourceforge.net/safekeep/?rev=832&view=rev
Author: fcrawford
Date: 2013-01-01 06:11:39 +0000 (Tue, 01 Jan 2013)
Log Message:
-----------
Protect against simple process names and entries.
Modified Paths:
--------------
safekeep/trunk/safekeep
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2013-01-01 05:53:41 UTC (rev 831)
+++ safekeep/trunk/safekeep 2013-01-01 06:11:39 UTC (rev 832)
@@ -1089,7 +1089,10 @@
proc_file = "/proc/" + pid + "/cmdline"
if pid != current_pid and os.path.exists(proc_file):
fin = open(proc_file, "r")
- (cmd, arg0, args) = fin.read().split('\0', 2)
+ try:
+ (cmd, arg0, args) = fin.read().split('\0', 2)
+ except:
+ arg0 = ''
fin.close()
if os.path.basename(arg0) == "safekeep":
raise Exception('another safekeep process running: pid %s' % pid)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|