aboutsummaryrefslogtreecommitdiff
path: root/libltrace.c
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2012-03-02 00:10:37 +0100
committerPetr Machata <pmachata@redhat.com>2012-04-19 01:12:50 +0200
commitc805c624d4cd23674bbc18f9d0f97c5d8dcdff7c (patch)
tree8560d40ada7f1e5fb5c7caa17696c1b2474f876b /libltrace.c
parent29add4fdf852b10ddd22cac0d1390f6d01577bc2 (diff)
downloadltrace-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.c4
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(&lte, 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) {