Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tcgetpgrp(3) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cfgetospeed, cfsetospeed, cfgetispeed, cfsetispeed

tcgetattr, tcsetattr

tcsendbreak, tcdrain, tcflush, tcflow



TCGETPGRP(3,F)              AIX Technical Reference              TCGETPGRP(3,F)



-------------------------------------------------------------------------------
tcgetpgrp, tcsetpgrp



PURPOSE

Get and set foreground process group ID.

LIBRARY

Standard I/O Library (libc.a)

SYNTAX

#include <termios.h>

pid_t tcgetpgrp (fildes)
int fildes;

int tcsetpgrp (fildes, pgrp_id)
int fildes;
pid_t pgrp_id;

DESCRIPTION

The tcgetpgrp function returns the value of the process group ID of the
foreground process group associated with the terminal. The tcgetpgrp function
is allowed from a background process.  However, the information may be
subsequently changed by a foreground process.

The tcsetpgrp function sets the foreground process group ID associated with
terminal to pgrp_id if the process has a controlling terminal. The file
associated with fildes must be the controlling terminal of the calling process
and the controlling terminal must be associated with the session of the calling
process.  The value of pgrp_id must not match a process ID or a process group
ID of a process in another session.

RETURN VALUE

Upon successful completion, a value of 0 is returned.  Otherwise, a value of -1
is returned and errno is set to indicated the error.

ERROR CONDITIONS

If any of the  following conditions occur, the function returns -1 and sets
errno to the corresponding value:

EBADF     The fildes argument is not a valid file descriptor.

EINVAL    The device does not support the function.




Processed November 7, 1990      TCGETPGRP(3,F)                                1





TCGETPGRP(3,F)              AIX Technical Reference              TCGETPGRP(3,F)



ENOTTY    The  calling process does not have a controlling terminal or the file
          is not the controlling terminal.

EPERM     The value of pgrp_id matches the process ID or process group ID of a
          process in another session.

RELATED INFORMATION

In this book:  "cfgetospeed, cfsetospeed, cfgetispeed, cfsetispeed,"
"tcgetattr, tcsetattr," and "tcsendbreak, tcdrain, tcflush, tcflow."













































Processed November 7, 1990      TCGETPGRP(3,F)                                2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026