From 5699f1d4db485de0c837c1d3bd5f6e96f250858c Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Thu, 13 Feb 2014 16:02:50 +0100 Subject: Initialize struct process.e_machine and .e_class for secondary threads --- proc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/proc.c b/proc.c index 6f4f64e..17bb3cd 100644 --- a/proc.c +++ b/proc.c @@ -224,9 +224,11 @@ process_init(struct process *proc, const char *filename, pid_t pid) goto fail; } - if (proc->leader != proc) - return 0; - if (process_init_main(proc) < 0) { + if (proc->leader != proc) { + proc->e_machine = proc->leader->e_machine; + proc->e_class = proc->leader->e_class; + get_arch_dep(proc); + } else if (process_init_main(proc) < 0) { process_bare_destroy(proc, 0); goto fail; } -- cgit v1.2.3