Author: remi
Date: 2009-07-15 14:35:32 +0200 (Wed, 15 Jul 2009)
New Revision: 5117
Modified:
software_suite_v3/smart-core/smart-server/trunk/util/smartcore/OldProcessKiller.py
Log:
* Added function to kill previous children instances on Linux.
Modified:
software_suite_v3/smart-core/smart-server/trunk/util/smartcore/OldProcessKiller.py
===================================================================
---
software_suite_v3/smart-core/smart-server/trunk/util/smartcore/OldProcessKiller.py
2009-07-15 12:10:59 UTC (rev 5116)
+++
software_suite_v3/smart-core/smart-server/trunk/util/smartcore/OldProcessKiller.py
2009-07-15 12:35:32 UTC (rev 5117)
@@ -122,7 +122,25 @@
def __killOldSmartCoreChildrenUnix():
"""Kill all process alive from a previous instance of smart-core. Unix.
"""
- pass
+ processInfosList = __getProcessIdNameCmdLineListUnix()
+ pidToKill = []
+ for e in processInfosList:
+ pid = e[0]
+ name = e[1]
+ cmdline = e[2]
+ if name.lower().find("python") != -1:
+ if cmdline.lower().find("executables") != -1:
+ pidToKill.append(pid)
+ continue
+ if cmdline.lower().find("workforplugins") != -1:
+ pidToKill.append(pid)
+ continue
+ if (cmdline.lower().find("tuxdroid") != -1) and \
+ (cmdline.lower().find("util") != -1):
+ pidToKill.append(pid)
+ continue
+ for pid in pidToKill:
+ os.system("kill -9 " + str(pid))
#
------------------------------------------------------------------------------
# Kill previous smart-server. Unix.
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn