Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > T

tcsetpgrp(3C)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

tcsetpgrp() — set foreground process group id

SYNOPSIS

#include <unistd.h>

int tcsetpgrp(int fildes, pid_t pgrp_id);

DESCRIPTION

If the calling process has a controlling terminal, tcsetpgrp() sets the foreground process group ID associated with the terminal referenced by fildes to pgrp_id. The file associated with fildes must be the controlling terminal of the calling process and the controlling terminal must be currently associated with the session of the calling process. The value of pgrp_id must match a process group ID of a process in the same session as the calling process.

RETURN VALUE

Upon successful completion, tcsetpgrp() returns zero. Otherwise, tcsetpgrp() returns -1 and sets errno to indicate the error.

ERRORS

tcsetpgrp() fails if any of the following conditions are encountered:

[EBADF]

fildes is not a valid file descriptor.

[EINVAL]

The value of the pgrp_id argument is not supported.

[ENOTTY]

The calling process does not have a controlling terminal, or the fildes is not the controlling terminal, or the controlling terminal is no longer associated with the session of the calling process.

[EPERM]

The value of pgrp_id is a supported value but does not match the process group ID of a process in the same session as the calling process.

STANDARDS CONFORMANCE

tcsetpgrp(): AES, SVID3, XPG3, XPG4, FIPS 151-2, POSIX.1

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.