aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/sys_sunos32.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2007-04-12 16:13:42 -0400
committerDavid S. Miller <davem@davemloft.net>2007-04-12 16:13:42 -0400
commit1d51c69fb6e61054cd6cc485f9bef77d19d82751 (patch)
treea21148d4bb8f98a152e038104f8e8fdbcb4d584d /arch/sparc64/kernel/sys_sunos32.c
parent2f3a2efd85b698e51e90f06a37d85066725fb4c4 (diff)
[SPARC]: avoid CHILD_MAX and OPEN_MAX constants
I don't figure anyone really cares about SunOS syscall emulation, and I certainly don't. But I'm getting rid of uses of the OPEN_MAX and CHILD_MAX compile-time constant, and these are almost the only ones. OPEN_MAX is a bogus constant with no meaning about anything. The RLIMIT_NOFILE resource limit is what sysconf (_SC_OPEN_MAX) actually wants to return. The CHILD_MAX cases weren't actually using anything I want to get rid of, but I noticed that they are there and are wrong too. The CHILD_MAX value is not really unlimited as a -1 return from sysconf indicates. The RLIMIT_NPROC resource limit is what sysconf (_SC_CHILD_MAX) wants to return. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/sys_sunos32.c')
-rw-r--r--arch/sparc64/kernel/sys_sunos32.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc64/kernel/sys_sunos32.c b/arch/sparc64/kernel/sys_sunos32.c
index 4cff95b7b3a4..8f7a06e2c7e7 100644
--- a/arch/sparc64/kernel/sys_sunos32.c
+++ b/arch/sparc64/kernel/sys_sunos32.c
@@ -871,7 +871,7 @@ asmlinkage s32 sunos_sysconf (int name)
871 ret = ARG_MAX; 871 ret = ARG_MAX;
872 break; 872 break;
873 case _SC_CHILD_MAX: 873 case _SC_CHILD_MAX:
874 ret = -1; /* no limit */ 874 ret = current->signal->rlim[RLIMIT_NPROC].rlim_cur;
875 break; 875 break;
876 case _SC_CLK_TCK: 876 case _SC_CLK_TCK:
877 ret = HZ; 877 ret = HZ;
@@ -880,7 +880,7 @@ asmlinkage s32 sunos_sysconf (int name)
880 ret = NGROUPS_MAX; 880 ret = NGROUPS_MAX;
881 break; 881 break;
882 case _SC_OPEN_MAX: 882 case _SC_OPEN_MAX:
883 ret = OPEN_MAX; 883 ret = current->signal->rlim[RLIMIT_NOFILE].rlim_cur;
884 break; 884 break;
885 case _SC_JOB_CONTROL: 885 case _SC_JOB_CONTROL:
886 ret = 1; /* yes, we do support job control */ 886 ret = 1; /* yes, we do support job control */