1 .\" Copyright (c) 1983, 1991 Regents of the University of California.
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)getpgrp.2 6.4 (Berkeley) 3/10/91
34 .\" Modified Sat Jul 24 01:15:33 1993 by Rik Faith (faith@cs.unc.edu)
35 .\" Modified 15 April 1995 by Michael Chastain (mec@shell.portal.com):
37 .\" Translated to German Sun Oct 13 1996 by Patrick Rother <krd@gulu.net>
39 .TH SETPGID 2 "13. Oktober 1996" "Linux 1.2.4" "Systemaufrufe"
41 setpgid, getpgid, setpgrp, getpgrp \- setze/hole Prozessgruppe
43 .B #include <unistd.h>
45 .BI "int setpgid(pid_t " pid ", pid_t " pgid );
47 .BI "pid_t getpgid(pid_t " pid );
51 .B pid_t getpgrp(void);
54 setzt die Prozessgruppenkennung (Process Group ID) des durch
56 angegebenen Prozesses auf
60 Null ist wird die aktuelle Prozesskennung benutzt. Wenn
62 Null ist wird die Prozesskennung des durch
64 angegebenen Prozesses benutzt.
67 gibt die Prozessgruppenkennung des Prozesses zurück, der durch
72 Null ist, wird die Prozesskennung des aktuellen Prozesses benutzt.
74 In der Bibliothek Linux DLL 4.4.1 ruft
84 Prozessgruppen werden benutzt zur Verbreitung von Signalen und von Terminals
85 zum Verteilen von Eingabeanforderungen: Prozesses, die die gleiche
86 Prozessgruppe haben wie das Terminal, sind im Vordergrund und dürfen lesen,
87 während andere mit einem Signal blockiert sind, wenn sie versuchen zu lesen.
89 Diese Aufrufe sind werden also benutzt von Programmen wie
91 um Prozessgruppen zu erzeugen, um Job-Kontrolle zu realisieren. Die Aufrufe
97 beschrieben sind, werden benutzt, um die Prozessgruppe des kontrollierenden
98 Terminals zu lesen/zu setzen.
101 .BR setpgid " und " setpgrp
102 Null zurück. Im Fehlerfall wird \-1 zurückgegeben und
104 entsprechend gesetzt.
107 gibt bei Erfolg eine Prozessgruppe zurück.
108 Im Fehlerfall wird \-1 zurückgegeben und
110 entsprechend gesetzt.
113 gibt immer die aktuelle Prozessgruppe zurück.
121 Verschiedene Zugriffsrechteprobleme.
125 entspricht keinem Prozess.