Initialize struct process.e_machine and .e_class for secondary threads
authorPetr Machata <pmachata@redhat.com>
Thu, 13 Feb 2014 15:02:50 +0000 (16:02 +0100)
committerChanho Park <chanho61.park@samsung.com>
Fri, 22 Aug 2014 11:38:25 +0000 (20:38 +0900)
proc.c

diff --git a/proc.c b/proc.c
index 6f4f64ef1c7abc284a6e8e561bdc2e319d81646b..17bb3cd58a1ccef07777f91220f3d0172b306363 100644 (file)
--- 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;
        }