34
34
:return: a tuple: function-result, a StraceResult.
39
def strace_detailed(function, args, kwargs, follow_children=True):
41
37
# (https://bugs.launchpad.net/ubuntu/+source/strace/+bug/103133) and the
42
38
# test suite hangs if the '-f' is given to strace *and* more than one
46
44
# capture strace output to a file
47
45
log_file = tempfile.NamedTemporaryFile()
48
46
log_file_fd = log_file.fileno()
51
49
strace_cmd = ['strace', '-r', '-tt', '-p', str(pid), '-o', log_file.name]
54
52
proc = subprocess.Popen(strace_cmd,