ctermid man page on Tru64

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

ctermid(3)							    ctermid(3)

NAME
       ctermid - Generate the pathname for the controlling terminal

SYNOPSIS
       #include <stdio.h>

       char *ctermid(
	       char *s );

LIBRARY
       Standard C Library (libc)

STANDARDS
       Interfaces  documented on this reference page conform to industry stan‐
       dards as follows:

       ctermid():  XPG4, XPG4-UNIX

       Refer to the standards(5) reference page	 for  more  information	 about
       industry standards and associated tags.

PARAMETERS
       Points to the array into which the ctermid() function copies the string
       representing the pathname.

DESCRIPTION
       The ctermid() function generates a string that, when used  as  a	 path‐
       name,  refers  to  the  current	controlling  terminal  for the current
       process. If ctermid() returns a pathname, access to  the	 file  is  not
       guaranteed.

       The  ctermid() function differs from the ttyname() function in that the
       ttyname() function is supplied a file descriptor and returns the actual
       name  of	 the  terminal associated with that file descriptor, while the
       ctermid() function returns a string (/dev/tty) that refers to the  ter‐
       minal  if  used	as  a filename. Thus, the ttyname() function is useful
       only if the process already has at least one file open to a terminal.

RETURN VALUES
       If the s parameter is not a null pointer,  it  points  to  a  character
       array  of  at  least  L_ctermid	bytes.	The pathname is placed in this
       array and the value of the s parameter is returned. The	symbolic  con‐
       stant  L_ctermid is defined in the stdio.h header file, and has a value
       greater than 0 (zero).

       If the s parameter is a null pointer, the string is stored in an inter‐
       nal static area and the address is returned. The next call to the cter‐
       mid() function overwrites the contents of the internal static area.

       If the pathname that would refer to the controlling terminal cannot  be
       determined,  or if the function is unsuccessful, the ctermid() function
       returns an empty string.

SEE ALSO
       Functions: ttyname(3)

       Standards: standards(5)

								    ctermid(3)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Tru64

List of man pages available for Tru64

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