ksh: build with __EXTENSIONS__ to expose confstr
[unleashed.git] / share / man / man2 / setpgrp.2
blob3268d6bf3498d5a9ad970fa371d7098904556289
1 '\" te
2 .\"  Copyright 1989 AT&T  Copyright (c) 2000, Sun Microsystems, Inc.  All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH SETPGRP 2 "Jan 5, 2000"
7 .SH NAME
8 setpgrp \- set process group ID
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <sys/types.h>
13 #include <unistd.h>
15 \fBpid_t\fR \fBsetpgrp\fR(\fBvoid\fR);
16 .fi
18 .SH DESCRIPTION
19 .sp
20 .LP
21 If the calling process is not already a session leader, the \fBsetpgrp()\fR
22 function makes it one by setting its process group \fBID\fR and session
23 \fBID\fR to the value of its process \fBID\fR, and releases its controlling
24 terminal. See \fBIntro\fR(2) for more information on process group \fBID\fRs
25 and session leaders.
26 .SH RETURN VALUES
27 .sp
28 .LP
29 The \fBsetpgrp()\fR function returns the value of the new process group
30 \fBID\fR.
31 .SH ERRORS
32 .sp
33 .LP
34 No errors are defined.
35 .SH ATTRIBUTES
36 .sp
37 .LP
38 See \fBattributes\fR(5) for descriptions of the following attributes:
39 .sp
41 .sp
42 .TS
43 box;
44 c | c
45 l | l .
46 ATTRIBUTE TYPE  ATTRIBUTE VALUE
48 Interface Stability     Standard
49 .TE
51 .SH SEE ALSO
52 .sp
53 .LP
54 \fBsetpgrp\fR(1), \fBIntro\fR(2), \fBexec\fR(2), \fBfork\fR(2),
55 \fBgetpid\fR(2), \fBgetsid\fR(2), \fBkill\fR(2), \fBsignal\fR(3C),
56 \fBattributes\fR(5), \fBstandards\fR(5)