|
|
|
@ -614,7 +614,7 @@ def removeFileWithEmptyDirectory(rmName, stopDirectory="/"):
|
|
|
|
|
stopDirectory=stopDirectory)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getRunCommands(not_chroot=False):
|
|
|
|
|
def getRunCommands(not_chroot=False, chroot=None):
|
|
|
|
|
"""List run program"""
|
|
|
|
|
def getCmd(procNum):
|
|
|
|
|
cmdLineFile = '/proc/%s/cmdline'%procNum
|
|
|
|
@ -624,6 +624,10 @@ def getRunCommands(not_chroot=False):
|
|
|
|
|
root_link = '/proc/%s/root'%procNum
|
|
|
|
|
if os.readlink(root_link) != "/":
|
|
|
|
|
return ""
|
|
|
|
|
if chroot is not None:
|
|
|
|
|
root_link = '/proc/%s/root'%procNum
|
|
|
|
|
if os.readlink(root_link) != chroot:
|
|
|
|
|
return ""
|
|
|
|
|
return open(cmdLineFile,'r').read().strip()
|
|
|
|
|
except Exception as e:
|
|
|
|
|
pass
|
|
|
|
|