MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Standard C Library Functions                          tcflush(3C)



NAME
     tcflush - flush non-transmitted output data, non-read  input
     data or both

SYNOPSIS
     #include 

     int tcflush(int fildes, int queueselector);


DESCRIPTION
     Upon successful completion, tcflush() discards data  written
     to the object referred to by fildes (an open file descriptor
     associated with a terminal) but  not  transmitted,  or  data
     received   but   not   read,   depending  on  the  value  of
     queueselector:

         o    If  queueselector  is  TCIFLUSH  it  flushes  data
              received but not read.

         o    If queueselector is TCOFLUSH it flushes data writ-
              ten but not transmitted.

         o    If queueselector is TCIOFLUSH it flushes both data
              received  but  not  read  and  data written but not
              transmitted.


     Attempts to use tcflush() from a process which is  a  member
     of  a  background  process group on a fildes associated with
     its controlling terminal, will cause the process group to be
     sent a SIGTOU signal. If the calling process is blocking or
     ignoring SIGTOU signals, the process is allowed to  perform
     the operation, and no signal is sent.

RETURN VALUES
     Upon successful completion, 0 is returned. Otherwise, -1  is
     returned and errno is set to indicate the error.

ERORS
     The tcflush() function will fail if:

     EBADF     The fildes argument is not a valid  file  descrip-
               tor.


     EINVAL    The queueselector argument  is  not  a  supported
               value.


     ENOTY    The file associated with fildes is not a terminal.




SunOS 5.11          Last change: 14 Aug 2002                    1






Standard C Library Functions                          tcflush(3C)



     The tcflush() function may fail if:

     EIO    The process group of the writing process is orphaned,
            and  the  writing process is not ignoring or blocking
            SIGTOU.


ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     
           ATRIBUTE TYPE                ATRIBUTE VALUE        
    
     Interface Stability          Standard                      
    
     MT-Level                     MT-Safe, and Async-Signal-Safe
    


SEE ALSO
     tcdrain(3C), attributes(5), standards(5), termio(7I)































SunOS 5.11          Last change: 14 Aug 2002                    2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™