summaryrefslogtreecommitdiff
path: root/host/utils
diff options
context:
space:
mode:
Diffstat (limited to 'host/utils')
-rw-r--r--host/utils/forked.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/host/utils/forked.py b/host/utils/forked.py
index 9e72d7d3..5185034a 100644
--- a/host/utils/forked.py
+++ b/host/utils/forked.py
@@ -35,14 +35,14 @@ class Forked:
"""
def __init__ (self, function):
- """Initialise, fork, and call the given function in the children
- process."""
- self.pid = os.fork ()
- if self.pid == 0:
- function ()
- sys.exit (0)
+ """Initialise, fork, and call the given function in the children
+ process."""
+ self.pid = os.fork ()
+ if self.pid == 0:
+ function ()
+ sys.exit (0)
def kill (self):
- """Kill the forked function."""
- os.kill (self.pid, signal.SIGTERM)
- os.waitpid (self.pid, 0)
+ """Kill the forked function."""
+ os.kill (self.pid, signal.SIGTERM)
+ os.waitpid (self.pid, 0)