1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
.\" Copyright Michael Haardt (michael@cantor.informatik.rwth-aachen.de) Sat Aug 27 20:43:50 MET DST 1994
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" the License, or (at your option) any later version.
.\"
.\" The GNU General Public License's references to "object code"
.\" and "executables" are to be interpreted as the output of any
.\" document formatting or typesetting system, including
.\" intermediate and printed output.
.\"
.\" This manual is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public
.\" License along with this manual; if not, write to the Free
.\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
.\" USA.
.\"
.\" Modified Sun Sep 11 19:19:05 1994 faith@cs.unc.edu
.\" Modified Mon Mar 25 10:19:00 1996 aeb@cwi.nl (merged a few
.\" tiny changes from a man page by Charles Livingston).
.\" Translated into german by Stefan Janke (gonzo@burg.studfb.unibw-muenchen.de)
.\"
.TH SETSID 2 "12. September 1996" "" "Systemaufrufe"
.SH BEZEICHNUNG
setsid \- erzeugt eine neue Sitzung und setzt die Prozessgruppen-ID
.SH "ÜBERSICHT"
.ad l
.B #include <unistd.h>
.sp
.B pid_t setsid(void);
.br
.ad b
.SH BESCHREIBUNG
.B setsid()
erzeugt eine neue Sitzung, wenn der aufrufende Prozess kein
Prozessgruppen-Führer ist. Der aufrufende Prozess wird dann Führer
der neuen Sitzung und der Prozessgruppenführer der neuen
Prozessgruppe, außerdem hat er kein ihn controllierendes Terminal
(tty). Die Prozessgruppen-ID und die Session-ID des aufrufenden
Prozesses wird auf die Prozess-ID des aufrufenden Prozesses
gesetzt. Der aufrufende Prozess ist der einzige Prozess in dieser
neuen Prozessgruppe und in dieser Sitzung.
.SH "RÜCKGABEWERT"
Die Sitzungs-ID des aufrufenden Prozesses.
.SH FEHLER
Im Fehlerfall wird \-1 zurückgegeben. Der einzige Fehler, der
auftreten kann, ist EPERM.
.SH ANMERKUNGEN
Wenn der aufrufende Prozess bereits ein Prozessgruppen-Führer ist, so
mißlingt
.BR setsid .
.SH "KONFORM ZU"
POSIX
.SH "SIEHE AUCH"
.BR setpgid (2),
.BR setpgrp (2).
|