summaryrefslogtreecommitdiffstats
path: root/modules/process.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@mdehaan.rdu.redhat.com>2007-09-24 14:52:43 -0400
committerMichael DeHaan <mdehaan@mdehaan.rdu.redhat.com>2007-09-24 14:52:43 -0400
commit412671ee48804867fc6707fa12409ae9365f5ea3 (patch)
tree2a29b9acf28b8e372d54504dc7c7d6a9890f7ae9 /modules/process.py
parent731190a1b414e3d5b31e6de5c80772d6f532f658 (diff)
downloadfunc-412671ee48804867fc6707fa12409ae9365f5ea3.tar.gz
func-412671ee48804867fc6707fa12409ae9365f5ea3.tar.xz
func-412671ee48804867fc6707fa12409ae9365f5ea3.zip
Package the subprocess module so that we can use it on EL4.
Diffstat (limited to 'modules/process.py')
-rwxr-xr-xmodules/process.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/process.py b/modules/process.py
index aa5e315..3e40fe1 100755
--- a/modules/process.py
+++ b/modules/process.py
@@ -15,7 +15,7 @@
##
# other modules
-import subprocess
+import sub_process
# our modules
from codes import *
@@ -41,7 +41,7 @@ class ProcessModule(func_module.FuncModule):
flags.replace(";","") # prevent stupidity
- cmd = subprocess.Popen("ps %s" % flags,stdout=subprocess.PIPE,shell=True)
+ cmd = sub_process.Popen("ps %s" % flags,stdout=sub_process.PIPE,shell=True)
data = cmd.communicate()[0]
results = []
@@ -53,12 +53,12 @@ class ProcessModule(func_module.FuncModule):
return results
def kill(self,pid,level=""):
- rc = subprocess.call("/bin/kill %s %s" % (pid, level), shell=True)
+ rc = sub_process.call("/bin/kill %s %s" % (pid, level), shell=True)
return rc
def pkill(self,name,level=""):
# example killall("thunderbird","-9")
- rc = subprocess.call("/usr/bin/pkill %s %s" % (name, level), shell=True)
+ rc = sub_process.call("/usr/bin/pkill %s %s" % (name, level), shell=True)
return rc
methods = ProcessModule()