[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#include <termios.h> int tcsetpgrp (int fd, pid_t pgroup_id); |
This function sets the foreground process group ID for the terminal connected to file descriptor fd. fd must be a valid handle connected to a terminal device, and pgroup_id must be the process group ID of the calling process, or the function will fail.
If fd is a valid handle connected to a terminal and
pgroup_id is equal to what getpgrp()
returns
(see section getpgrp), the function will do nothing and return zero.
Otherwise, -1 will be returned and errno
will be set to a
suitable value. In particular, if the pgroup_id argument is
different from what getpgrp()
returns, tcsetpgrp
sets
errno
to ENOSYS
.
ANSI/ISO C | No |
POSIX | 1003.2-1992; 1003.1-2001 |