getsid() implementation

This commit is contained in:
Ben Gras
2011-08-02 19:22:08 +02:00
parent c0bb1ba1b1
commit c4ea2a195c
7 changed files with 34 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
.PATH: ${.CURDIR}/sys-minix
SRCS+= accept.c access.c bind.c brk.c sbrk.c m_closefrom.c compat.S \
SRCS+= accept.c access.c bind.c brk.c sbrk.c m_closefrom.c getsid.c compat.S \
chdir.c chmod.c fchmod.c chown.c fchown.c chroot.c close.c \
connect.c dup.c dup2.c execve.c fcntl.c flock.c fpathconf.c fork.c \
fstatfs.c fstatvfs.c fsync.c ftruncate.c getdents.c getegid.c getgid.c \

View File

@@ -0,0 +1,14 @@
#include <sys/cdefs.h>
#include <lib.h>
#include "namespace.h"
#include <unistd.h>
pid_t getsid(pid_t p)
{
message m;
memset(&m, 0, sizeof(m));
m.PM_GETSID_PID = p;
return(_syscall(PM_PROC_NR, PM_GETSID, &m));
}