From b6753b3f6f85c8a9ee8cee37b392f44090bfc1cf Mon Sep 17 00:00:00 2001 From: Peter Schauer Date: Sat, 29 Jul 1995 20:56:22 +0000 Subject: * procfs.c (unconditionally_kill_inferior): Clear current signal if PROCFS_NEED_CLEAR_CURSIG_FOR_KILL is defined. * config/alpha/nm-osf3.h (PROCFS_NEED_CLEAR_CURSIG_FOR_KILL): Define. --- gdb/procfs.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gdb/procfs.c') diff --git a/gdb/procfs.c b/gdb/procfs.c index bf57c6b..9584bd1 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -1251,8 +1251,14 @@ unconditionally_kill_inferior (pi) signo = SIGKILL; +#ifdef PROCFS_NEED_CLEAR_CURSIG_FOR_KILL + /* Alpha OSF/1-3.x procfs needs a clear of the current signal + before the PIOCKILL, otherwise it might generate a corrupted core + file for the inferior. */ + ioctl (pi->fd, PIOCSSIG, NULL); +#endif #ifdef PROCFS_NEED_PIOCSSIG_FOR_KILL - /* Alpha OSF/1 procfs needs a PIOCSSIG call with a SIGKILL signal + /* Alpha OSF/1-2.x procfs needs a PIOCSSIG call with a SIGKILL signal to kill the inferior, otherwise it might remain stopped with a pending SIGKILL. We do not check the result of the PIOCSSIG, the inferior might have -- cgit v1.1