CMS 3D CMS Logo

Functions | Variables

sysUtil Namespace Reference

Functions

def processRunning
def runCmmd

Variables

tuple pid = runCmmd('cat -; echo ";to stderr" 1>&2',shell=True)

Function Documentation

def sysUtil::processRunning (   processid)
check if a process is still running

Definition at line 14 of file sysUtil.py.

00015                              :
00016     """
00017     check if a process is still running
00018     """
00019     return os.path.exists(os.path.join('/proc',str(processid)))

def sysUtil::runCmmd (   cmmdline,
  shell = False 
)
runsubprocess return processid

Definition at line 5 of file sysUtil.py.

00006                                  :
00007     """runsubprocess return processid
00008     """
00009     args=[]
00010     proc=Popen(cmmdline,shell=shell,stdout=PIPE,stdin=PIPE,stderr=STDOUT)
00011     stdout_value,stderr_value=proc.communicate()
00012     print repr(stdout_value)
00013     return proc.pid


Variable Documentation

tuple sysUtil::pid = runCmmd('cat -; echo ";to stderr" 1>&2',shell=True)

Definition at line 22 of file sysUtil.py.