diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc/kernel/sys_sunos.c | 4 | ||||
-rw-r--r-- | arch/sparc64/kernel/sys_sunos32.c | 4 | ||||
-rw-r--r-- | arch/sparc64/solaris/misc.c | 6 |
3 files changed, 8 insertions, 6 deletions
diff --git a/arch/sparc/kernel/sys_sunos.c b/arch/sparc/kernel/sys_sunos.c index da6606f0cffc..f807172cab0e 100644 --- a/arch/sparc/kernel/sys_sunos.c +++ b/arch/sparc/kernel/sys_sunos.c | |||
@@ -910,7 +910,7 @@ asmlinkage long sunos_sysconf (int name) | |||
910 | ret = ARG_MAX; | 910 | ret = ARG_MAX; |
911 | break; | 911 | break; |
912 | case _SC_CHILD_MAX: | 912 | case _SC_CHILD_MAX: |
913 | ret = -1; /* no limit */ | 913 | ret = current->signal->rlim[RLIMIT_NPROC].rlim_cur; |
914 | break; | 914 | break; |
915 | case _SC_CLK_TCK: | 915 | case _SC_CLK_TCK: |
916 | ret = HZ; | 916 | ret = HZ; |
@@ -919,7 +919,7 @@ asmlinkage long sunos_sysconf (int name) | |||
919 | ret = NGROUPS_MAX; | 919 | ret = NGROUPS_MAX; |
920 | break; | 920 | break; |
921 | case _SC_OPEN_MAX: | 921 | case _SC_OPEN_MAX: |
922 | ret = OPEN_MAX; | 922 | ret = current->signal->rlim[RLIMIT_NOFILE].rlim_cur; |
923 | break; | 923 | break; |
924 | case _SC_JOB_CONTROL: | 924 | case _SC_JOB_CONTROL: |
925 | ret = 1; /* yes, we do support job control */ | 925 | ret = 1; /* yes, we do support job control */ |
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 */ |
diff --git a/arch/sparc64/solaris/misc.c b/arch/sparc64/solaris/misc.c index bca16e8c95c3..9fcaad6dd11f 100644 --- a/arch/sparc64/solaris/misc.c +++ b/arch/sparc64/solaris/misc.c | |||
@@ -363,8 +363,10 @@ asmlinkage int solaris_sysconf(int id) | |||
363 | { | 363 | { |
364 | switch (id) { | 364 | switch (id) { |
365 | case SOLARIS_CONFIG_NGROUPS: return NGROUPS_MAX; | 365 | case SOLARIS_CONFIG_NGROUPS: return NGROUPS_MAX; |
366 | case SOLARIS_CONFIG_CHILD_MAX: return -1; /* no limit */ | 366 | case SOLARIS_CONFIG_CHILD_MAX: |
367 | case SOLARIS_CONFIG_OPEN_FILES: return OPEN_MAX; | 367 | return current->signal->rlim[RLIMIT_NPROC].rlim_cur; |
368 | case SOLARIS_CONFIG_OPEN_FILES: | ||
369 | return current->signal->rlim[RLIMIT_NOFILE].rlim_cur; | ||
368 | case SOLARIS_CONFIG_POSIX_VER: return 199309; | 370 | case SOLARIS_CONFIG_POSIX_VER: return 199309; |
369 | case SOLARIS_CONFIG_PAGESIZE: return PAGE_SIZE; | 371 | case SOLARIS_CONFIG_PAGESIZE: return PAGE_SIZE; |
370 | case SOLARIS_CONFIG_XOPEN_VER: return 3; | 372 | case SOLARIS_CONFIG_XOPEN_VER: return 3; |