1 .\" Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
3 .\" @APPLE_LICENSE_HEADER_START@
5 .\" The contents of this file constitute Original Code as defined in and
6 .\" are subject to the Apple Public Source License Version 1.1 (the
7 .\" "License"). You may not use this file except in compliance with the
8 .\" License. Please obtain a copy of the License at
9 .\" http://www.apple.com/publicsource and read it before using this file.
11 .\" This Original Code and all software distributed under the License are
12 .\" distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
13 .\" EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
14 .\" INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
15 .\" FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
16 .\" License for the specific language governing rights and limitations
17 .\" under the License.
19 .\" @APPLE_LICENSE_HEADER_END@
26 .Nd get the process group ID for the session leader for the controlling terminal
36 function obtains the process group ID of the session for which the terminal
39 is the controlling terminal.
41 Upon successful completion,
43 returns the process group ID associated with the terminal.
48 is set to indicate the error.
52 function will fail if:
57 argument is not associated with a controlling terminal.
61 argument is not a valid file descriptor.
63 The file associated with