.\" Copyright (C) 2002 Andries Brouwer <aeb@cwi.nl>
.\"
+.\" %%%LICENSE_START(VERBATIM)
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
.\"
-.TH TCGETPGRP 3 2003-01-28 "GNU" "Linux Programmer's Manual"
+.TH TCGETPGRP 3 2014-01-13 "GNU" "Linux Programmer's Manual"
.SH NAME
tcgetpgrp, tcsetpgrp \- get and set terminal foreground process group
.SH SYNOPSIS
.LP
The function
.BR tcsetpgrp ()
-makes the process group with process group ID \fIpgrp\fP
+makes the process group with process group ID
+.I pgrp
the foreground process group on the terminal associated to
.IR fd ,
which must be the controlling terminal of the calling process,
and still be associated with its session.
-Moreover, \fIpgrp\fP must be a (nonempty) process group belonging to
+Moreover,
+.I pgrp
+must be a (nonempty) process group belonging to
the same session as the calling process.
.LP
If
a
.B SIGTTOU
signal is sent to all members of this background process group.
-.SH "RETURN VALUE"
+.SH RETURN VALUE
When
.I fd
refers to the controlling terminal of the calling process,
.I pgrp
has a supported value, but is not the process group ID of a
process in the same session as the calling process.
-.SH "CONFORMING TO"
+.SH ATTRIBUTES
+.SS Multithreading (see pthreads(7))
+The
+.BR tcgetpgrp ()
+and
+.BR tcsetpgrp ()
+functions are thread-safe.
+.SH CONFORMING TO
POSIX.1-2001.
.SH NOTES
These functions are implemented via the
.SS History
The ioctls appeared in 4.2BSD.
The functions are POSIX inventions.
-.SH "SEE ALSO"
+.SH SEE ALSO
.BR setpgid (2),
.BR setsid (2),
.BR credentials (7)
+.SH COLOPHON
+This page is part of release 3.67 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.