*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> pclose (3)              



NAME    [Toc]    [Back]

       pclose - Closes a pipe to a process

SYNOPSIS    [Toc]    [Back]

       #include <stdio.h>

       int pclose(
               FILE *stream );

LIBRARY    [Toc]    [Back]

       Standard C Library (libc)

STANDARDS    [Toc]    [Back]

       Interfaces  documented  on  this reference page conform to
       industry standards as follows:

       pclose():  XPG4, XPG4-UNIX

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

PARAMETERS    [Toc]    [Back]

       Points  to a FILE structure for an open pipe returned by a
       previous call to the popen() function.

DESCRIPTION    [Toc]    [Back]

       The pclose() function closes a pipe  between  the  calling
       program  and  a  shell  command  to  be  executed. Use the
       pclose() function to close any stream you have opened with
       the  popen() function. The pclose() function waits for the
       associated process to end, and then returns the exit  status
 of the command.


       If the original processes and the process started with the
       popen() function concurrently read or write a common file,
       neither  should  use buffered I/O. If they do, the results
       are unpredictable.

RETURN VALUES    [Toc]    [Back]

       Upon successful completion, the pclose() function  returns
       the exit status of the command.

       If  an error is detected, pclose() sets errno to an appropriate
 value and returns a value of -1.

ERRORS    [Toc]    [Back]

       If the pclose() function fails, errno may be  set  to  the
       following value: The status of the child process could not
       be obtained.

SEE ALSO    [Toc]    [Back]

       Functions: fclose(3), popen(3), wait(2)

       Standards: standards(5)

[ Back ]
 Similar pages
Name OS Title
popen Tru64 Initiates a pipe to a process
popen IRIX initiate pipe to/from a process
MrmCloseHierarchy HP-UX Closes a UID hierarchy
MrmCloseHierarchy Tru64 Closes a UID hierarchy
MrmCloseHierarchy IRIX Closes a UID hierarchy
CDclose IRIX closes a CD-ROM device
DtMmdbCloseInfoLib HP-UX closes an infolib
pclos IRIX closes a filled polygon
closeobj IRIX closes an object definition
dglclose IRIX closes the DGL server connection
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service