aboutsummaryrefslogtreecommitdiff
path: root/handle_event.c
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2012-04-13 22:19:02 +0200
committerPetr Machata <pmachata@redhat.com>2012-04-19 01:38:03 +0200
commitcb39a404fcf944e0ae6ec58da9e0448bf49ff290 (patch)
tree87d5198b573e768701699ff3ceec18983cb552c1 /handle_event.c
parentd3cc9889fdfe2e523e99ca5f664f8ae4b3936612 (diff)
downloadltrace-cb39a404fcf944e0ae6ec58da9e0448bf49ff290.tar.gz
Wait for initial event from process after exec
Diffstat (limited to 'handle_event.c')
-rw-r--r--handle_event.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/handle_event.c b/handle_event.c
index e47b9a2..b852873 100644
--- a/handle_event.c
+++ b/handle_event.c
@@ -497,6 +497,13 @@ handle_exec(Event * event) {
breakpoints_init(proc, 0);
proc->callstack_depth = 0;
continue_process(proc->pid);
+
+ /* After the exec, we expect to hit the first executable
+ * instruction. It would be nice to have this removed, but
+ * then we need to do that also for initial call to
+ * wait_for_proc in execute_program. XXX todo. */
+ wait_for_proc(proc->pid);
+ continue_process(proc->pid);
}
static void