File: setsid.2

package info (click to toggle)
manpages-fr 0.8-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 5,760 kB
  • ctags: 4
  • sloc: makefile: 57; sh: 8
file content (79 lines) | stat: -rw-r--r-- 2,757 bytes parent folder | download | duplicates (2)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
.\" 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).
.\" Modified Sun Jul 21 14:45:46 1996 aeb@cwi.nl
.\"
.\" Traduction 15/10/1996 par Christophe Blaess (ccb@club-internet.fr)
.\" Mise a Jour 8/04/97
.TH SETSID 2 "8 Avril 1997" Linux "Manuel du programmeur Linux"
.SH NOM
setsid \- Crer une session et fixer l'ID du groupe de processus.
.SH SYNOPSIS
.ad l
.B #include <unistd.h>
.sp
.B pid_t setsid(void);
.br
.ad b
.SH DESCRIPTION
\fBsetsid()\fP 
cre une nouvelle session si le processus appelant n'est pas un
leader de groupe. Le processus appelant devient le leader du nouveau
groupe, et n'a pas de terminal de contrle.
L'ID du groupe de processus et l'ID de session du processus appelant
sont fixs  la valeur de PID du processus en cours.
Le processus en cours sera le seul dans son groupe et sa session.

.SH "VALEUR RENVOYE"
.B setsid
renvoient l'ID de session du processus en cours, ou \-1 s'il
chouent, auquel cas
.I errno
contient le code d'erreur.
.SH ERREURS
La seule erreur susceptible de se produire est EPERM.
Elle est dclenche si l'ID du groupe de processus d'un
processus quelconque est gal au PID du processus appelant.
En particulier
.B setsid
choue si le processus appelant est dj leader d'un groupe.
.SH NOTES
Le leader d'un groupe est le processus dont le PID est gal
 l'ID du groupe. Pour s'assurer que
.B setsid
russira, il faut effectuer un
.BR fork(),
suivi d'un 
.BR exit()
pour le pre, et le fils appelera
.BR setsid().
.SH "CONFORMIT"
POSIX, SVr4
.SH "VOIR AUSSI"
.BR setpgid (2),
.BR setpgrp (2)

.SH TRADUCTION
Christophe Blaess, 1997.