www.delorie.com/djgpp/doc/libc/libc_812.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

tcsetpgrp

Syntax

 
#include <termios.h>

int tcsetpgrp (int fd, pid_t pgroup_id);

Description

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.

Return Value

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.

Portability

ANSI/ISO C No
POSIX 1003.2-1992; 1003.1-2001


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2004   by DJ Delorie     Updated Apr 2004