tcgetpgrp man page on OPENSTEP

Man page or keyword search:  
man Server   1419 pages
apropos Keyword Search (all sections)
Output format
OPENSTEP logo
[printable version]


TCGETPGRP(3P)							 TCGETPGRP(3P)

NAME
       tcgetpgrp, tcsetpgrp - get and set foreground process group ID

SYNOPSIS
       #include <sys/types.h>

       int tcgetpgrp(int fildes);

       int tcsetpgrp(int fildes, pid_t pgrp_id);

DESCRIPTION
       Tcgetpgrp  returns  the value of the process group ID of the foreground
       process group associated with the terminal, indicated  through  fildes.
       It  may	be  called  from  a  process  that is a member of a background
       process group; however, the information may be  changed	by  a  process
       that is a member of a foreground process group.

       Tcsetpgrp  sets	the  foreground	 process  group ID associated with the
       controlling  terminal,  indicated  through  fildes,  to	pgrp_id.   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  tcgetpgrp and tcsetpgrp return a value of
       zero.  Otherwise, a value of  -1	 is  returned  and  errno  is  set  to
       indicate the error.

ERRORS
       Tcgetpgrp   and	tcsetpgrp  shall  return  -1  and  set	errno  to  the
       corresponding value:

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

       [ENOTTY]	      The  calling  process  does  not	have   a   controlling
		      terminal.

       [ENOTTY]	      The  file	 given	through	 fildes is not the controlling
		      terminal.

       The following errors may be associated with tcsetpgrp:

       [EINVAL]	      The value of the pgrp_id argument is not valid.

       [ENOTTY]	      The controlling terminal is no  longer  associated  with
		      the session of the calling process.

       [EPERM]	      The  value  of  pgrp_id  is  a valid value, but does not
		      match the process group ID of  a	process	 in  the  same
		      session as the calling process.

SEE ALSO
       setsid(2P), setpgid(2P)

4th Berkeley Distribution	August 1, 1992			 TCGETPGRP(3P)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server OPENSTEP

List of man pages available for OPENSTEP

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net