Index of Section 2 Manual Pages

Interix / SUAtcgetpgrp.2Interix / SUA

tcgetpgrp(2)                                               tcgetpgrp(2)

  tcgetpgrp()

  NAME

    tcgetpgrp() - get foreground process group ID

  SYNOPSIS

    #include 
    #include 

    pid_t tcgetpgrp (int fd)

  DESCRIPTION

    This call returns the ID number of the terminal's foreground process
    group.

    A member of a background process group can call this routine, but the
    value of the process group ID may be later changed by a foreground
    process.

    If there is no foreground process group, tcgetpgrp(2) returns an invalid
    number.

  RETURN VALUES

    On success, tcgetpgrp(2) returns a process group ID as a pid_t. On
    failure, it returns -1 and sets errno

  ERRORS

    tcgetpgrp(2) can fail for the following reasons:

    [EBADF]
        The fd argument is not a valid file descriptor.

    [ENOTTY]
        The calling process does not have a controlling terminal or the
        underlying terminal device represented by fd is not the controlling
        terminal.

  SEE ALSO

    setpgid(2)

    setsid(2)

    tcsetpgrp(2)

  USAGE NOTES

    The tcgetpgrp function is thread safe.

    The tcgetpgrp function is async-signal safe.


Interix / SUAHosted at SUA Community for Interix, SUA and SFUInterix / SUA