tclUnixPipe.c File Reference

#include "tclInt.h"

Go to the source code of this file.

Data Structures

struct  PipeState

Defines

#define MakeFile(fd)   ((TclFile)INT2PTR(((int)(fd))+1))
#define GetFd(file)   (PTR2INT(file)-1)

Functions

TclFile TclpMakeFile (Tcl_Channel channel, int direction)
TclFile TclpOpenFile (const char *fname, int mode)
TclFile TclpCreateTempFile (const char *contents)
Tcl_ObjTclpTempFileName (void)
int TclpCreatePipe (TclFile *readPipe, TclFile *writePipe)
int TclpCloseFile (TclFile file)
int TclpCreateProcess (Tcl_Interp *interp, int argc, const char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr)
Tcl_Channel TclpCreateCommandChannel (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr)
void TclGetAndDetachPids (Tcl_Interp *interp, Tcl_Channel chan)
Tcl_Pid Tcl_WaitPid (Tcl_Pid pid, int *statPtr, int options)
int Tcl_PidObjCmd (ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
void TclpFinalizePipes (void)


Define Documentation

#define GetFd ( file   )     (PTR2INT(file)-1)

Definition at line 29 of file tclUnixPipe.c.

Referenced by TclpCloseFile(), TclpCreateCommandChannel(), and TclpCreateProcess().

#define MakeFile ( fd   )     ((TclFile)INT2PTR(((int)(fd))+1))

Definition at line 28 of file tclUnixPipe.c.

Referenced by TclpCreatePipe(), TclpCreateTempFile(), TclpMakeFile(), and TclpOpenFile().


Function Documentation

Tcl_Pid Tcl_WaitPid ( Tcl_Pid  pid,
int *  statPtr,
int  options 
)

Definition at line 1188 of file tclUnixPipe.c.

References INT2PTR, and PTR2INT.

Referenced by Tcl_ReapDetachedProcs(), TclCleanupChildren(), and TclpCreateProcess().

void TclGetAndDetachPids ( Tcl_Interp interp,
Tcl_Channel  chan 
)

int TclpCloseFile ( TclFile  file  ) 

Definition at line 326 of file tclUnixPipe.c.

References GetFd, and Tcl_DeleteFileHandler().

Referenced by Tcl_OpenCommandChannel(), TclCreatePipeline(), and TclpCreateProcess().

Tcl_Channel TclpCreateCommandChannel ( TclFile  readFile,
TclFile  writeFile,
TclFile  errorFile,
int  numPids,
Tcl_Pid pidPtr 
)

int TclpCreatePipe ( TclFile readPipe,
TclFile writePipe 
)

Definition at line 289 of file tclUnixPipe.c.

References FD_CLOEXEC, and MakeFile.

Referenced by TclCreatePipeline(), and TclpCreateProcess().

int TclpCreateProcess ( Tcl_Interp interp,
int  argc,
const char **  argv,
TclFile  inputFile,
TclFile  outputFile,
TclFile  errorFile,
Tcl_Pid pidPtr 
)

TclFile TclpCreateTempFile ( const char *  contents  ) 

void TclpFinalizePipes ( void   ) 

Definition at line 1279 of file tclUnixPipe.c.

Referenced by TclFinalizeIOSubsystem().

TclFile TclpMakeFile ( Tcl_Channel  channel,
int  direction 
)

Definition at line 108 of file tclUnixPipe.c.

References MakeFile, PTR2INT, Tcl_GetChannelHandle(), and TCL_OK.

Referenced by TCL_DECLARE_MUTEX(), and TclCreatePipeline().

TclFile TclpOpenFile ( const char *  fname,
int  mode 
)

Tcl_Obj* TclpTempFileName ( void   ) 

Definition at line 245 of file tclUnixPipe.c.

References FD_CLOEXEC, L_tmpnam, and TclpNativeToNormalized.

Referenced by TclLoadFile().



Generated on Wed Mar 12 12:18:37 2008 by  doxygen 1.5.1