SYNOPSIS
#include <sys/types.h>
#include <termios.h>
int tcsetpgrp(int fildes, pid_t pgid);
DESCRIPTION
If the process has a controlling terminal,
PARAMETERS
- fildes
-
Specifies a file descriptor associated with the controlling terminal of the calling process.
- pgid
-
Specifies the process group ID to be used for the foreground process. pgid must match a process group ID of a process in the same session as the calling process.
RETURN VALUES
If successful,
- EBADF
-
The fildes parameter is not a valid file descriptor.
- EINVAL
-
The device does not support the value of pgid.
- ENOTTY
-
The calling process does not have a controlling terminal, or the file is not the controlling terminal, or the controlling terminal is no longer associated with the session of the calling process.
- EPERM
-
The device supports the value of pgid, but it does not match the process group ID of a process in the same session as the calling process.
CONFORMANCE
POSIX.1 (1996).
MULTITHREAD SAFETY LEVEL
Async-signal-safe.
PORTING ISSUES
None.
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Functions:
setpgid() ,setsid() ,tcgetpgrp()
PTC MKS Toolkit 10.4 Documentation Build 39.