Changeset 2213
- Timestamp:
- Jul 6, 2005, 5:49:58 AM (20 years ago)
- Location:
- trunk/src/emx
- Files:
- 
      - 2 added
- 3 edited
 
 - 
          
  include/InnoTekLIBC/backend.h (modified) (1 diff, 1 prop)
- 
          
  src/lib/misc/getpgid.c (added)
- 
          
  src/lib/misc/getpgrp.c (modified) (1 diff, 1 prop)
- 
          
  src/lib/misc/getsid.c (added)
- 
          
  src/lib/sys/b_processCredentials.c (modified) (2 diffs, 1 prop)
 
Legend:
- Unmodified
- Added
- Removed
- 
      trunk/src/emx/include/InnoTekLIBC/backend.h- 
Property       cvs2svn:cvs-rev
 changed from       1.26to1.27
 r2212 r2213 854 854 855 855 /** 856 * Gets the session id of the current process. 857 * @returns Session id. 858 * @returns Negated errno on failure. 859 * @param pid Process to get the process group for. 860 * Use 0 for the current process. 861 */ 862 pid_t __libc_Back_processGetSid(pid_t pid); 863 864 /** 865 * Gets the process group of the specfied process. 866 * @returns Process group. 867 * @returns Negated errno on failure. 868 * @param pid Process to get the process group for. 869 * Use 0 for the current process. 870 */ 871 pid_t __libc_Back_processGetPGrp(pid_t pid); 872 873 /** 856 874 * Gets the most favourable priority of a process, group of processes 857 875 * or all processed owned by a user. 
- 
Property       cvs2svn:cvs-rev
 changed from       
- 
      trunk/src/emx/src/lib/misc/getpgrp.c- 
Property       cvs2svn:cvs-rev
 changed from       1.4to1.5
 r2212 r2213 1 /* getpgrp.c (emx+gcc) -- Copyright (c) 1994-1995 by Eberhard Mattes */ 1 /* $Id: $ */ 2 /** @file 3 * 4 * LIBC - getpgrp(). 5 * 6 * Copyright (c) 2005 knut st. osmundsen <bird@anduin.net> 7 * 8 * 9 * This file is part of InnoTek LIBC. 10 * 11 * InnoTek LIBC is free software; you can redistribute it and/or modify 12 * it under the terms of the GNU General Public License as published by 13 * the Free Software Foundation; either version 2 of the License, or 14 * (at your option) any later version. 15 * 16 * InnoTek LIBC is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU General Public License for more details. 20 * 21 * You should have received a copy of the GNU General Public License 22 * along with InnoTek LIBC; if not, write to the Free Software 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 * 25 */ 2 26 27 28 /******************************************************************************* 29 * Header Files * 30 *******************************************************************************/ 3 31 #include "libc-alias.h" 4 32 #include <unistd.h> 5 #include <process.h> 6 #include <sys/types.h> 33 #include <errno.h> 34 #include <InnoTekLIBC/backend.h> 35 #define __LIBC_LOG_GROUP __LIBC_LOG_GRP_PROCESS 36 #include <InnoTekLIBC/logstrict.h> 7 37 8 pid_t _STD(getpgrp) (void) 38 39 /** 40 * Gets the process group id of the current process. 41 * 42 * @returns the process group id. 43 * @remark Equivalent to getpgid(0). 44 */ 45 pid_t _STD(getpgrp)(void) 9 46 { 10 return getpid (); 47 LIBCLOG_ENTER("\n"); 48 pid_t pgrp = __libc_Back_processGetPGrp(0); 49 LIBCLOG_RETURN_INT(pgrp); 11 50 } 51 
- 
Property       cvs2svn:cvs-rev
 changed from       
- 
      trunk/src/emx/src/lib/sys/b_processCredentials.c- 
Property       cvs2svn:cvs-rev
 changed from       1.1to1.2
 r2212 r2213 30 30 * Header Files * 31 31 *******************************************************************************/ 32 #include "libc-alias.h" 33 #include "syscalls.h" 32 34 #include <errno.h> 33 35 #include <InnoTekLIBC/sharedpm.h> … … 152 154 } 153 155 156 157 /** 158 * Gets the session id of the current process. 159 * @returns Session id. 160 * @returns Negated errno on failure. 161 * @param pid Process to get the process group for. 162 * Use 0 for the current process. 163 */ 164 pid_t __libc_Back_processGetSid(pid_t pid) 165 { 166 LIBCLOG_ENTER("\n"); 167 pid_t sid; 168 if (pid == 0 || pid == _sys_pid) 169 sid = __libc_spmGetId(__LIBC_SPMID_SID); 170 else 171 sid = -EACCES; 172 LIBCLOG_RETURN_INT(sid); 173 } 174 175 176 /** 177 * Gets the process group of the specfied process. 178 * @returns Process group. 179 * @returns Negated errno on failure. 180 * @param pid Process to get the process group for. 181 * Use 0 for the current process. 182 */ 183 pid_t __libc_Back_processGetPGrp(pid_t pid) 184 { 185 LIBCLOG_ENTER("pid=%d\n", pid); 186 pid_t pgrp; 187 if (pid == 0 || pid == _sys_pid) 188 pgrp = __libc_spmGetId(__LIBC_SPMID_PGRP); 189 else 190 pgrp = -EACCES; 191 LIBCLOG_RETURN_INT(pgrp); 192 } 193 
- 
Property       cvs2svn:cvs-rev
 changed from       
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  
