summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2005-03-07 18:18:29 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-03-07 18:18:29 -0800
commitbb5b29911b8c7ad7041c4e1a15b0e9b19c7f97da (patch)
tree1fa500a6e212764435f2c2ba7f2807636928d6a1 /include
parenta36e7143a21007aee0dac83952ca02a64e5fd5a2 (diff)
[PATCH] set RLIMIT_SIGPENDING limit based on RLIMIT_NPROC
While looking into the issues Jeremy had with the RLIMIT_SIGPENDING limit, it occurred to me that the normal setting of this limit is bizarrely low. The initial hard limit setting (MAX_SIGPENDING) was taken from the old max_queued_signals parameter, which was for the entire system in aggregate. But even as a per-user limit, the 1024 value is incongruously low for this. On my machine, RLIMIT_NPROC allows me 8192 processes, but only 1024 queued signals, i.e. fewer even than one pending signal in each process. (To me, this really puts in doubt the sensibility of using a per-user limit for this rather than a per-process one, i.e. counted in sighand_struct or signal_struct, which could have a much smaller reasonable value. I don't recall the rationale for making this new limit per-user in the first place.) This patch sets the default RLIMIT_SIGPENDING limit at boot time, using the calculation that decides the default RLIMIT_NPROC limit. This uses the same value for those two limits, which I think is still pretty conservative on the RLIMIT_SIGPENDING value. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/resource.h2
-rw-r--r--include/linux/signal.h2
2 files changed, 1 insertions, 3 deletions
diff --git a/include/asm-generic/resource.h b/include/asm-generic/resource.h
index c0c910498273..b1fcda9eac23 100644
--- a/include/asm-generic/resource.h
+++ b/include/asm-generic/resource.h
@@ -79,7 +79,7 @@
[RLIMIT_MEMLOCK] = { MLOCK_LIMIT, MLOCK_LIMIT }, \
[RLIMIT_AS] = { RLIM_INFINITY, RLIM_INFINITY }, \
[RLIMIT_LOCKS] = { RLIM_INFINITY, RLIM_INFINITY }, \
- [RLIMIT_SIGPENDING] = { MAX_SIGPENDING, MAX_SIGPENDING }, \
+ [RLIMIT_SIGPENDING] = { 0, 0 }, \
[RLIMIT_MSGQUEUE] = { MQ_BYTES_MAX, MQ_BYTES_MAX }, \
}
diff --git a/include/linux/signal.h b/include/linux/signal.h
index 3d8bf1afdb51..99c97ad026c8 100644
--- a/include/linux/signal.h
+++ b/include/linux/signal.h
@@ -8,8 +8,6 @@
#ifdef __KERNEL__
-#define MAX_SIGPENDING 1024
-
/*
* Real Time signals may be queued.
*/