possible PATCH to include/asm*/signal.h to fix SIGRTMAX not protected from userland

David Dyck (dcd@tc.fluke.com)
Fri, 13 Mar 1998 15:28:40 -0800


While testing the soon to be release 5.005 of perl, I
am lead to ask the question.

Why isn't there an
#ifdef __KERNEL__
around the lines:

/* These should not be considered constants from userland. */
#define SIGRTMIN 32
#define SIGRTMAX (_NSIG-1)

in the linux kernel files
include/asm-*/signal.h

Since _NSIG is kept from userland with an
#ifdef __KERNEL__

perl breaks when it tries to reference SIGRTMAX

[ Perl uses its Configure script to detect which
signals are available, using awk and other tools
to generate a test program to determine the
names and numbers of the signals that are really
available ]

While perl Configure could build
SIGRTMAX into its list of signals to avoid,
we have the opportunity to correct the linux header
files so we don't have to build special knowledge
in the application program.

the following patch should be applied to most of
the include/asm*/signal.h files (perhaps not asm-sparc* files though)

--- /usr/src/linux-2.1.89/include/asm-i386/signal.h Fri Feb 6 10:06:56 1998
+++ /tmp/signal.h Fri Mar 13 15:18:02 1998
@@ -65,9 +65,11 @@
#define SIGPWR 30
#define SIGUNUSED 31

+#ifdef __KERNEL__
/* These should not be considered constants from userland. */
#define SIGRTMIN 32
#define SIGRTMAX (_NSIG-1)
+#endif /* __KERNEL__ */

/*
* SA_FLAGS values:

David Dyck
dcd@tc.fluke.com (Email)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu