Ver código fonte

* fpgetsid, Mantis #20329

git-svn-id: trunk@19178 -
marco 14 anos atrás
pai
commit
07fabab526

+ 6 - 0
rtl/bsd/bunxsysc.inc

@@ -306,6 +306,12 @@ begin
  FPsetsid:=do_syscall(syscall_nr_setsid);
 end;
 
+function fpgetsid (pid:TPid): pid_t;
+
+begin
+ fpgetsid:=do_syscall(syscall_nr_getsid,TSysParam(pid));
+end;
+
 Function FPumask(cmask:mode_t):mode_t;
 {
   Sets file creation mask to (Mask and 0777 (octal) ), and returns the

+ 1 - 0
rtl/freebsd/sysnr.inc

@@ -127,5 +127,6 @@ const
  syscall_nr_kse_switchin                = 440;
  syscall_nr_getrlimit                   = 194;
  syscall_nr_setrlimit                   = 195;
+ syscall_nr_getsid			= 310;
 
 

+ 6 - 0
rtl/linux/bunxsysc.inc

@@ -306,6 +306,12 @@ begin
  fpsetsid:=do_syscall(syscall_nr_setsid);
 end;
 
+function fpgetsid (pid:TPid): pid_t;
+
+begin
+ fpgetsid:=do_syscall(syscall_nr_getsid,pid);
+end;
+
 Function fpumask(cmask:mode_t):mode_t;
 {
   Sets file creation mask to (Mask and 0777 (octal) ), and returns the

+ 1 - 0
rtl/unix/bunxh.inc

@@ -52,6 +52,7 @@ Type TGrpArr = Array [0..0] of TGid;            { C style array workarounds}
     Function  FpGetgroups (gidsetsize : cInt; var grouplist : tgrparr): cInt;
     Function  FpGetpgrp : TPid;
     Function  FpSetsid  : TPid;
+    Function  FpGetsid (pid:TPid)  : TPid;
     Function  FpFcntl      (fildes : cInt; cmd : cInt): cInt;
     Function  FpFcntl      (fildes : cInt; cmd : cInt; arg : cInt): cInt;
     Function  FpFcntl      (fildes : cInt; cmd : cInt; var arg : flock): cInt;

+ 2 - 0
rtl/unix/oscdeclh.inc

@@ -107,6 +107,8 @@ const
     Function  FpGetgroups  (gidsetsize : cInt; var grouplist : tgrparr):cint; cdecl;external clib name 'getgroups';
     Function  FpGetpgrp : TPid;  cdecl;external clib name 'getpgrp';
     Function  FpSetsid  : TPid; cdecl;external clib name 'setsid';
+    Function  FpGetsid (pid:TPid)  : TPid; cdecl; external clib name 'getsid';
+
     Function  FpPipe       (var fildes : tfildes):cInt; cdecl;external clib name 'pipe';
     { The libc version has "..." as third parameter -> wrap for }
     { interface compatibility with syscalls                     }