Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for process_monitor_unix.py start_target() #83

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions process_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ def pre_send (self, test_number):
def start_target (self):
"""
Start up the target process by issuing the commands in self.start_commands.

@returns True if successful. No failure detection yet.
"""

self.log("starting target process")
Expand Down
10 changes: 7 additions & 3 deletions process_monitor_unix.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import signal
import time
import threading
import subprocess

from sulley import pedrpc

Expand Down Expand Up @@ -63,7 +64,7 @@ def __init__(self, start_command):

def spawn_target(self):
print self.tokens
self.pid = os.spawnv(os.P_NOWAIT, self.tokens[0], self.tokens)
self.pid = subprocess.Popen(self.tokens).pid
self.alive = True

def start_monitoring(self):
Expand Down Expand Up @@ -172,9 +173,11 @@ def pre_send (self, test_number):
self.test_number = test_number

def start_target (self):
'''
"""
Start up the target process by issuing the commands in self.start_commands.
'''

@returns True if successful. No failure detection yet.
"""

self.log("starting target process")

Expand All @@ -184,6 +187,7 @@ def start_target (self):
threading.Thread(target=self.dbg.start_monitoring).start()
self.log("done. target up and running, giving it 5 seconds to settle in.")
time.sleep(5)
return True

def stop_target (self):
'''
Expand Down