From b9daa0066d792983da59154af3ae486eff9b9aa1 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Sat, 14 Dec 2002 19:44:20 -0800 Subject: [PATCH] threaded coredumps, tcore-fixes-2.5.51-A0 This fixes one more threaded-coredumps detail reported by the glibc people: all threads taken down by the coredump code should report the proper exit code. We can do this rather easily via the group_exit mechanism. 'Other' threads used to report SIGKILL, which was highly confusing as the shell often displayed the 'Killed' message instead of a 'Segmentation fault' message. Another missing bit was the 0x80 bit set in the exit status for all threads, if the coredump was successful. (it's safe to set this bit in ->sig->group_exit_code in an unlocked way because all threads are artificially descheduled by the coredump code.) --- include/linux/binfmts.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index dfea0f47ed3e..ae1b454395b5 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h @@ -57,7 +57,7 @@ extern int setup_arg_pages(struct linux_binprm * bprm); extern int copy_strings(int argc,char ** argv,struct linux_binprm *bprm); extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm); extern void compute_creds(struct linux_binprm *binprm); -extern int do_coredump(long signr, struct pt_regs * regs); +extern int do_coredump(long signr, int exit_code, struct pt_regs * regs); extern void set_binfmt(struct linux_binfmt *new); -- cgit v1.2.3