Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/irix Restore COMPAT_IRIX signal delivery to an us...



details:   https://anonhg.NetBSD.org/src/rev/26adf69cf571
branches:  trunk
changeset: 555103:26adf69cf571
user:      manu <manu%NetBSD.org@localhost>
date:      Sat Nov 08 21:28:45 2003 +0000

description:
Restore COMPAT_IRIX signal delivery to an usable state. We provide a
fake sigcode so that trampoline vers checks in sigaction1() will not
return EINVAL. Another fix would be to duplicate code from svr4_sys_sigaction()
to irix_sys_sigaction() and call sigaction1() with vers != 0. We do not
do that because it would duplicate some code.

diffstat:

 sys/compat/irix/irix_exec.c |  16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diffs (44 lines):

diff -r 293e881aa164 -r 26adf69cf571 sys/compat/irix/irix_exec.c
--- a/sys/compat/irix/irix_exec.c       Sat Nov 08 18:44:52 2003 +0000
+++ b/sys/compat/irix/irix_exec.c       Sat Nov 08 21:28:45 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: irix_exec.c,v 1.30 2003/08/24 17:52:42 chs Exp $ */
+/*     $NetBSD: irix_exec.c,v 1.31 2003/11/08 21:28:45 manu Exp $ */
 
 /*-
  * Copyright (c) 2001-2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: irix_exec.c,v 1.30 2003/08/24 17:52:42 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: irix_exec.c,v 1.31 2003/11/08 21:28:45 manu Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_syscall_debug.h"
@@ -79,6 +79,14 @@
 void irix_syscall_intern __P((struct proc *));
 #endif
 
+/* 
+ * Fake sigcode. COMPAT_IRIX does not use it, since the 
+ * signal trampoline is provided by libc. However, some
+ * other part of the kernel will be happier if we still
+ * provide non NULL sigcode and esigcode. 
+ */
+char irix_sigcode[] = { 0 };
+
 const struct emul emul_irix = {
        "irix",
        "/emul/irix",
@@ -96,8 +104,8 @@
 #endif
        irix_sendsig,
        trapsignal,
-       NULL,
-       NULL,
+       irix_sigcode,
+       irix_sigcode,
        NULL,
        setregs,
        irix_e_proc_exec,



Home | Main Index | Thread Index | Old Index