Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion systemvm/debian/opt/cloud/bin/cs/CsApp.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
# under the License.
import os
from CsFile import CsFile
from CsProcess import CsProcess
import CsHelper


Expand Down
4 changes: 2 additions & 2 deletions systemvm/debian/opt/cloud/bin/cs/CsProcess.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ def kill_all(self):

def find_pid(self):
self.pid = []
items = len(self.search)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should think about renaming search; it actually means to be the process/command name.

for i in CsHelper.execute("ps aux"):
items = len(self.search)
proc = re.split(r"\s+", i)[items*-1:]
proc = re.split(r"\s+", i)[10:]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

given this is null based the return is now the full cli as returned by ps aux ; 👍

matches = len([m for m in proc if m in self.search])
if matches == items:
self.pid.append(re.split(r"\s+", i)[1])
Expand Down