summaryrefslogtreecommitdiff
path: root/host/utils/forked.py
diff options
context:
space:
mode:
authorNicolas Schodet2009-02-09 20:05:30 +0100
committerNicolas Schodet2009-02-09 20:05:30 +0100
commit2e95e3a33bcb34aeec66551503c692c1cb80ab61 (patch)
tree6b763ee0d1bf458da0ced13f44535b42f3b8efb8 /host/utils/forked.py
parent552b28da98a387d13aea7403a7e72732a913277d (diff)
* all python:
- changed tabs to spaces.
Diffstat (limited to 'host/utils/forked.py')
-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)