diff options
Diffstat (limited to 'scripts/swabber-strace-attach')
-rwxr-xr-x | scripts/swabber-strace-attach | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/swabber-strace-attach b/scripts/swabber-strace-attach index d4f80e4e91..bb0391a7ca 100755 --- a/scripts/swabber-strace-attach +++ b/scripts/swabber-strace-attach | |||
@@ -1,6 +1,7 @@ | |||
1 | #!/usr/bin/env python | 1 | #!/usr/bin/env python |
2 | import os | 2 | import os |
3 | import sys | 3 | import sys |
4 | import subprocess | ||
4 | 5 | ||
5 | # Detach from the controlling terminal and parent process by forking twice to daemonize ourselves, | 6 | # Detach from the controlling terminal and parent process by forking twice to daemonize ourselves, |
6 | # then run the command passed as argv[1]. Send log data to argv[2]. | 7 | # then run the command passed as argv[1]. Send log data to argv[2]. |
@@ -24,7 +25,7 @@ os.dup2(si.fileno(), sys.stdin.fileno()) | |||
24 | os.dup2(so.fileno(), sys.stdout.fileno()) | 25 | os.dup2(so.fileno(), sys.stdout.fileno()) |
25 | os.dup2(se.fileno(), sys.stderr.fileno()) | 26 | os.dup2(se.fileno(), sys.stderr.fileno()) |
26 | 27 | ||
27 | ret = os.system(sys.argv[1]) | 28 | ret = subprocess.call(sys.argv[1], shell=True) |
28 | 29 | ||
29 | os._exit(ret) | 30 | os._exit(ret) |
30 | 31 | ||