aboutsummaryrefslogtreecommitdiffstats
path: root/run/executable/executable.py
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-04-23 17:28:12 -0400
committerJonathan Herman <hermanjl@cs.unc.edu>2013-04-23 17:28:12 -0400
commit2ceaa6c607ef85bde4f14017634d9d1621efca29 (patch)
treec85e755e59907a48ff762fd56473449f33c23894 /run/executable/executable.py
parenta0e4b9fe9d7fab9a50a626cfeda3c614a9a6af5d (diff)
parent7545402506aa76261e18d85af585ff0ac1cf05c1 (diff)
Merge branch 'master' into wip-color-mc
Conflicts: gen/generator.py parse/sched.py parse_exps.py
Diffstat (limited to 'run/executable/executable.py')
-rw-r--r--run/executable/executable.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/run/executable/executable.py b/run/executable/executable.py
index 263e305..a2426f1 100644
--- a/run/executable/executable.py
+++ b/run/executable/executable.py
@@ -6,9 +6,10 @@ from common import get_executable
6class Executable(object): 6class Executable(object):
7 '''Parent object that represents an executable for use in task-sets.''' 7 '''Parent object that represents an executable for use in task-sets.'''
8 8
9 def __init__(self, exec_file, extra_args=None, stdout_file = None, stderr_file = None): 9 def __init__(self, exec_file, extra_args=None, stdout_file = None,
10 stderr_file = None, cwd = None):
10 self.exec_file = get_executable(exec_file) 11 self.exec_file = get_executable(exec_file)
11 self.cwd = None 12 self.cwd = cwd
12 self.stdout_file = stdout_file 13 self.stdout_file = stdout_file
13 self.stderr_file = stderr_file 14 self.stderr_file = stderr_file
14 self.sp = None 15 self.sp = None
@@ -58,6 +59,9 @@ class Executable(object):
58 def interrupt(self): 59 def interrupt(self):
59 self.sp.send_signal(signal.SIGINT) 60 self.sp.send_signal(signal.SIGINT)
60 61
62 def poll(self):
63 return self.sp.poll()
64
61 def terminate(self): 65 def terminate(self):
62 '''Send the terminate signal to the binary.''' 66 '''Send the terminate signal to the binary.'''
63 self.sp.terminate() 67 self.sp.terminate()