NAME
tcgetpgrp, tcsetpgrp - get and set terminal foreground process group
SYNOPSIS
#include <unistd.h> pid_t tcgetpgrp(int fd); int tcsetpgrp(int fd, pid_t pgrp);
DESCRIPTION
The function tcgetpgrp() returns the process group ID of the foreground process group on the terminal associated to fd, which must be the controlling terminal of the calling process. The function tcsetpgrp() makes the process group with process group ID pgrp the foreground process group on the terminal associated to fd, which must be the controlling terminal of the calling process, and still be associated with its session. Moreover, pgrp must be a (nonempty) process group belonging to the same session as the calling process. If tcsetpgrp() is called by a member of a background process group in its session, and the calling process is not blocking or ignoring SIGTTOU, a SIGTTOU signal is sent to all members of this background process group.
RETURN VALUE
When fd refers to the controlling terminal of the calling process, the function tcgetpgrp() will return the foreground process group ID of that terminal if there is one, and some value larger than 1 that is not presently a process group ID otherwise. When fd does not refer to the controlling terminal of the calling process, -1 is returned, and errno is set appropriately. When successful, tcsetpgrp() returns 0. Otherwise, it returns -1, and errno is set appropriately.
ERRORS
EBADF fd is not a valid file descriptor. EINVAL pgrp has an unsupported value. ENOTTY The calling process does not have a controlling terminal, or it has one but it is not described by fd, or, for tcsetpgrp(), this controlling terminal is no longer associated with the session of the calling process. EPERM pgrp has a supported value, but is not the process group ID of a process in the same session as the calling process.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7). Interface Attribute Value tcgetpgrp(), tcsetpgrp() Thread safety MT-Safe
CONFORMING TO
POSIX.1-2001, POSIX.1-2008.
NOTES
These functions are implemented via the TIOCGPGRP and TIOCSPGRP ioctls. History The ioctls appeared in 4.2BSD. The functions are POSIX inventions.
SEE ALSO
setpgid(2), setsid(2), credentials(7)
COLOPHON
This page is part of release 4.09 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
More Linux Commands
manpages/FcLangSetDestroy.3.html
FcLangSetDestroy(3) - destroy a langset object (Man Page)...
FcLangSetDestroy destroys a FcLangSet object, freeing all memory associated with it. VERSION Fontconfig version 2.8.0 FcLangSetDestroy.3 (Library - Linux manual
manpages/Tk_Fill3DPolygon.3.html
Tk_Fill3DPolygon(3) - draw borders with three-dimensional ap
These procedures provide facilities for drawing window borders in a way that produces a three-dimensional appearance. Tk_Alloc3DBorderFromObj allocates colors a
manpages/SDL_JoystickGetBall.3.html
SDL_JoystickGetBall(3) - Get relative trackball motion......
Get the ball axis change. Trackballs can only return relative motion since the last call to SDL_JoystickGetBall, these motion deltas a placed into dx and dy. RE
manpages/pcre16_fullinfo.3.html
pcre16_fullinfo(3) Perl-compatible regular expressions......
This function returns information about a compiled pattern. Its arguments are: code Compiled regular expression extra Result of pcre[16|32]_study() or NULL what
manpages/pbmtox10bm.1.html
pbmtox10bm(1) - convert a PBM image to an X11 bitmap........
pbmtox10bm was replaced in Netpbm 10.37 (December 2006) by pbmtoxbm(1) pbmtoxbm with the -x10 option is backward compatible with pbmtox10bm. pbmtoxbm also can g
manpages/wgetstr.3ncurses.html
wgetstr(3ncurses) - accept character strings from curses ter
The function getstr is equivalent to a series of calls to getch, until a newline or carriage return is received (the terminating character is not included in th
manpages/XtProcessUnlock.3.html
XtProcessUnlock(3) - lock and unlock process (Man Page).....
XtProcessLock is used to lock all process global data. XtProcessUnlock unlocks the process. SEE ALSO X Toolkit Intrinsics - C Language Interface Xlib - C Langua
manpages/gnutls_cipher_deinit.3.html
gnutls_cipher_deinit(3) - API function - Linux manual page
This function will deinitialize all resources occupied by the given encryption context. SINCE 2.10.0 REPORTING BUGS Report bugs to <bug-gnutls@gnu.org>. GnuTLS
manpages/unshare.2.html
unshare(2) - disassociate parts of the process execution con
unshare() allows a process to disassociate parts of its execution context that are currently being shared with other processes. Part of the execution context, s
manpages/aclocal.1.html
aclocal(1) - manual page for aclocal 1.11.1 - Linux man page
Generate aclocal.m4 by scanning configure.ac or configure.in OPTIONS --automake-acdir=DIR directory holding automake-provided m4 files --system-acdir=DIR direct
manpages/MenuPopup.3.html
MenuPopup(3) - map a pop-up (Library - Linux man page)......
The XtPopup function performs the following: * Calls XtCheckSubclass to ensure popup_shell is a subclass of Shell. * Generates an error if the shells popped_up
manpages/tk_bisque.n.html
tk_bisque(n) - Modify the Tk color palette - Linux man page
The tk_setPalette procedure changes the color scheme for Tk. It does this by modifying the colors of existing widgets and by changing the option database so tha
