]> err.no Git - linux-2.6/blobdiff - arch/sparc64/kernel/sys_sunos32.c
[ARM] 4652/1: pxa: fix a typo of pxa27x usb host clk definition
[linux-2.6] / arch / sparc64 / kernel / sys_sunos32.c
index 2ebc2c0513832ad64ec09b9266d245eef0028622..cfc22d3fe54c1cdd631ff3ffe1160d73e78aec18 100644 (file)
@@ -57,7 +57,6 @@
 #include <linux/personality.h>
 
 /* For SOCKET_I */
-#include <linux/socket.h>
 #include <net/sock.h>
 #include <net/compat.h>
 
@@ -824,10 +823,17 @@ asmlinkage int sunos_wait4(compat_pid_t pid, compat_uint_t __user *stat_addr, in
        return ret;
 }
 
-extern int kill_pg(int, int, int);
 asmlinkage int sunos_killpg(int pgrp, int sig)
 {
-       return kill_pg(pgrp, sig, 0);
+       int ret;
+
+       rcu_read_lock();
+       ret = -EINVAL;
+       if (pgrp > 0)
+               ret = kill_pgrp(find_vpid(pgrp), sig, 0);
+       rcu_read_unlock();
+
+       return ret;
 }
 
 asmlinkage int sunos_audit(void)
@@ -864,7 +870,7 @@ asmlinkage s32 sunos_sysconf (int name)
                ret = ARG_MAX;
                break;
        case _SC_CHILD_MAX:
-               ret = -1; /* no limit */
+               ret = current->signal->rlim[RLIMIT_NPROC].rlim_cur;
                break;
        case _SC_CLK_TCK:
                ret = HZ;
@@ -873,7 +879,7 @@ asmlinkage s32 sunos_sysconf (int name)
                ret = NGROUPS_MAX;
                break;
        case _SC_OPEN_MAX:
-               ret = OPEN_MAX;
+               ret = current->signal->rlim[RLIMIT_NOFILE].rlim_cur;
                break;
        case _SC_JOB_CONTROL:
                ret = 1;        /* yes, we do support job control */