Commit 3cbe9baf authored by David Wilson's avatar David Wilson

issue #70: remove redundant 'raise SystemExit'

Either execvp succeeds, in which case the process image is replaced, or
execvp throws an exception, in which case control flow exits the frame
anyway.
parent b2909ee5
...@@ -107,7 +107,6 @@ def create_child(*args): ...@@ -107,7 +107,6 @@ def create_child(*args):
childfp.close() childfp.close()
parentfp.close() parentfp.close()
os.execvp(args[0], args) os.execvp(args[0], args)
raise SystemExit
childfp.close() childfp.close()
LOG.debug('create_child() child %d fd %d, parent %d, cmd: %s', LOG.debug('create_child() child %d fd %d, parent %d, cmd: %s',
...@@ -170,7 +169,6 @@ def tty_create_child(*args): ...@@ -170,7 +169,6 @@ def tty_create_child(*args):
os.setsid() os.setsid()
os.close(os.open(os.ttyname(1), os.O_RDWR)) os.close(os.open(os.ttyname(1), os.O_RDWR))
os.execvp(args[0], args) os.execvp(args[0], args)
raise SystemExit
os.close(slave_fd) os.close(slave_fd)
LOG.debug('tty_create_child() child %d fd %d, parent %d, cmd: %s', LOG.debug('tty_create_child() child %d fd %d, parent %d, cmd: %s',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment