Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/t/tcsetpgrp.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/t/tcsetpgrp.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/t/tcsetpgrp.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/t/tcsetpgrp.html on line 8

tcsetpgrp()

Set the process group ID for a device

Synopsis:

#include <sys/types.h>
#include <unistd.h>

int tcsetpgrp( int fildes,
               pid_t pgrp_id );

Arguments:

fildes
A file descriptor that's associated with the device whose process group ID you want to set.
pgrp_id
The process group ID that you want to assign to the device.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The tcsetpgrp() function sets the process group ID associated with the device indicated by fildes to be pgrp_id.

If successful, the tcsetpgrp() function causes subsequent breaks on the indicated terminal device to generate a SIGINT on all process in the given process group.

Returns:

0
Success.
-1
An error occurred (errno is set).

Errors:

EBADF
The argument fildes is invalid.
EINVAL
The argument pgrp_id is invalid.
ENOSYS
The resource manager associated with fildes doesn't support this call.
ENOTTY
The argument fildes isn't associated with a terminal device.
EPERM
The argument pgrp_id isn't part of the same session as the calling process.

Examples:

#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>

int main( void )
  {
    /*
     * Direct breaks on stdin to me
     */
    tcsetpgrp( 0, getpid() );
    return EXIT_SUCCESS;
  }

Classification:

POSIX 1003.1

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

signal(), tcgetpgrp()


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/t/tcsetpgrp.html on line 181

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/t/tcsetpgrp.html on line 181