diff options
author | Petr Machata <pmachata@redhat.com> | 2012-03-02 00:10:37 +0100 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2012-04-19 01:12:50 +0200 |
commit | c805c624d4cd23674bbc18f9d0f97c5d8dcdff7c (patch) | |
tree | 8560d40ada7f1e5fb5c7caa17696c1b2474f876b /libltrace.c | |
parent | 29add4fdf852b10ddd22cac0d1390f6d01577bc2 (diff) | |
download | ltrace-c805c624d4cd23674bbc18f9d0f97c5d8dcdff7c.tar.gz |
wait_for_proc may fail, and should simply waitpid instead of ptracing
- which means that we need to continue the process after starting it,
the same as we do when attaching
Diffstat (limited to 'libltrace.c')
-rw-r--r-- | libltrace.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libltrace.c b/libltrace.c index 2295901..eec3cb9 100644 --- a/libltrace.c +++ b/libltrace.c @@ -118,7 +118,9 @@ ltrace_init(int argc, char **argv) { struct ltelf lte = {}; open_elf(<e, command); - open_program(command, execute_program(command, argv), 0); + pid_t pid = execute_program(command, argv); + open_program(command, pid, 0); + continue_process(pid); } opt_p_tmp = opt_p; while (opt_p_tmp) { |