ctermid man page on Xenix

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



     CTERMID(S)		      XENIX System V		    CTERMID(S)

     Name
	  ctermid - Generates a filename for a terminal.

     Syntax
	  #include <stdio.h>

	  char *ctermid(s)
	  char *s;

     Description
	  ctermid returns a pointer to a string that, when used as a
	  filename, refers to the controlling terminal of the calling
	  process.

	  If (int)s is zero, the string is stored in an internal
	  static area, the contents of which are overwritten at the
	  next call to ctermid, and the address of which is returned.
	  If (int)s is nonzero, then s is assumed to point to a
	  character array of at least L_ctermid elements; the string
	  is placed in this array and the value of s is returned.  The
	  manifest constant L_ctermid is defined in <stdio.h>.

     Notes
	  The difference between ctermid and ttyname(S) is that
	  ttyname must be given a file descriptor and it returns the
	  actual name of the terminal associated with that file
	  descriptor, while ctermid returns a magic string (/dev/tty)
	  that will refer to the terminal if used as a filename.  Thus
	  ttyname is useless unless the process already has at least
	  one file open to a terminal.

     See Also
	  ttyname(S)

     Page 1					      (printed 8/7/87)

[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Xenix

List of man pages available for Xenix

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