Back to index

glibc  2.9
Functions
tcgetpgrp.c File Reference
#include <termios.h>
#include <sysv_termio.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/ioctl.h>

Go to the source code of this file.

Functions

pid_t tcgetpgrp (int fd)

Function Documentation

pid_t tcgetpgrp ( int  fd)

Definition at line 28 of file tcgetpgrp.c.

{
  int pgrp;
  if (__ioctl (fd, _TIOCGPGRP, &pgrp) < 0)
    return (pid_t) -1;
  return (pid_t) pgrp;
}