summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixPipe.c
Commit message (Collapse)AuthorAgeFilesLines
* * generic/tclTest.c: Ignore the return value of write() whenrmax2008-03-141-3/+3
| | | | * unix/tclUnixPipe.c: we are about to exit anyways.
* Consolidate all code conditionalized on -DUSE_FIONBIO into one place.jenglish2008-02-281-47/+4
| | | | New routine TclUnixSetBlockingMode().
* merge stable branch onto HEADdgp2007-12-131-1/+1
|
* * generic/tclInt.decls: Revised the interfaces of the routinesdgp2007-06-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclExecute.c: TclStackAlloc and TclStackFree to make them easier for callers to use (or more precisely, harder to misuse). TclStackFree now takes a (void *) argument which is the pointer intended to be freed. TclStackFree will panic if that's not actually the memory the call will free. TSA/TSF also now tolerate receiving (interp == NULL), in which case they simply fall back to be calls to Tcl_Alloc/Tcl_Free. * generic/tclIntDecls.h: make genstubs * generic/tclBasic.c: Updated callers * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCompCmds.c: * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclFCmd.c: * generic/tclFileName.c: * generic/tclIOCmd.c: * generic/tclIndexObj.c: * generic/tclInterp.c: * generic/tclNamesp.c: * generic/tclProc.c: * generic/tclTrace.c: * unix/tclUnixPipe.c:
* * generic/tclBasic.c: Replace arrays on the C stack and ckallocdgp2007-04-021-5/+6
| | | | | | | | | | | | * generic/tclExecute.c: calls with TclStackAlloc calls to use memory * generic/tclFCmd.c: on Tcl's evaluation stack. * generic/tclFileName.c: * generic/tclIOCmd.c: * generic/tclIndexObj.c: * generic/tclInterp.c: * generic/tclNamesp.c: * generic/tclTrace.c: * unix/tclUnixPipe.c:
* various "const" additions, in line with TIP #27nijtmans2007-02-201-11/+11
|
* * generic/tclCompExpr.c: fix gcc warnings about 'cast to/fromdas2006-11-131-11/+11
| | | | | | | | | | | | | | | | | | | | | | | * generic/tclEncoding.c: pointer from/to integer of different * generic/tclEvent.c: size' on 64-bit platforms by casting to * generic/tclExecute.c: intermediate types intptr_t/uintptr_t * generic/tclHash.c: via new PTR2INT(), INT2PTR(), * generic/tclIO.c: PTR2UINT() and UINT2PTR() macros. * generic/tclInt.h: [Patch 1592791] * generic/tclProc.c: * generic/tclTest.c: * generic/tclThreadStorage.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/configure.in: * unix/tclUnixChan.c: * unix/tclUnixPipe.c: * unix/tclUnixPort.h: * unix/tclUnixTest.c: * unix/tclUnixThrd.c: * unix/configure: autoconf-2.59 * unix/tclConfig.h.in: autoheader-2.59
* * unix/tclUnixPipe.c (TclpCreateProcess): for USE_VFORK: ensure standarddas2006-08-021-1/+18
| | | | | channels are initialized before vfork() so that the child doesn't potentially corrupt global state in the parent's address space.
* * generic/regc_locale.c (cclass):das2006-07-201-3/+4
| | | | | | | | | | | | | * generic/tclExecute.c (TclExecuteByteCode): * generic/tclIOCmd.c (Tcl_ExecObjCmd): * generic/tclListObj.c (NewListIntRep): * generic/tclObj.c (Tcl_GetLongFromObj, Tcl_GetWideIntFromObj, FreeBignum, Tcl_SetBignumObj): * generic/tclParseExpr.c (Tcl_ParseExpr): * generic/tclStrToD.c (TclParseNumber): * generic/tclStringObj.c (TclAppendFormattedObjs): * unix/tclUnixPipe.c (TclpCreateProcess): fix signed-with-unsigned comparison and other warnings from gcc4 -Wextra.
* * doc/CrtChannel.3: Added TCL_CHANNEL_VERSION_5, made itandreas_kupries2006-03-271-2/+3
| | | | | | | | | | | | | | * generic/tcl.h: the version where the "truncateProc" * generic/tclIO.c: is defined at, and moved all channel * generic/tclIOGT.c: drivers of Tcl to v5. * generic/tclIORChan.c: * unix/tclUnixChan.c: * unix/tclUnixPipe.c: * win/tclWinChan.c: * win/tclWinConsole.c: * win/tclWinPipe.c: * win/tclWinSerial.c: * win/tclWinSock.c:
* ANSIfydkf2005-11-021-100/+96
|
* * generic/tclPipe.c (TclCreatePipeline): Arrange for POSIX systems todkf2005-07-281-2/+2
| | | | | | | | * unix/tclUnixPipe.c (TclpOpenFile): use the O_APPEND flag for * tests/exec.test (exec-19.1): files opened in a pipeline like ">>this". Note that Windows cannot support such access; there is no equivalent flag on the handle that can be set at the kernel-call level. The test is unix-specific in every way. [Bug 1245953]
* Getting more systematic about styledkf2005-07-241-264/+267
|
* bug 1225727Kevin B Kenny2005-06-221-1/+22
|
* Merged kennykb-numerics-branch back to the head; TIPs 132 and 232Kevin B Kenny2005-05-101-1/+1
|
* TIP#218 IMPLEMENTATIONandreas_kupries2005-01-271-2/+4
| | | | | | | | | | | | | | | | | | | | * generic/tclDecls.h: Regenerated from tcl.decls. * generic/tclStubInit.c: * doc/CrtChannel.3: Documentation of extended API, * generic/tcl.decls: extended testsuite, and * generic/tcl.h: implementation. Removal of old * generic/tclIO.c: driver-specific TclpCut/Splice * generic/tclInt.h: functions. Replaced with generic * tests/io.test: thread-action calls through the * unix/tclUnixChan.c: new hooks. Update of all builtin * unix/tclUnixPipe.c: channel drivers to version 4. * unix/tclUnixSock.c: Windows drivers extended to * win/tclWinChan.c: manage thread state in a thread * win/tclWinConsole.c: action handler. * win/tclWinPipe.c: * win/tclWinSerial.c: * win/tclWinSock.c:
* * generic/tclBasic.c:dgp2004-10-061-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclBinary.c: * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclCompExpr.c: * generic/tclDictObj.c: * generic/tclEncoding.c: * generic/tclExecute.c: * generic/tclFCmd.c: * generic/tclHistory.c: * generic/tclIndexObj.c: * generic/tclInterp.c: * generic/tclIO.c: * generic/tclIOCmd.c: * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclPkg.c: * generic/tclResult.c: * generic/tclScan.c: * generic/tclTimer.c: * generic/tclTrace.c: * generic/tclUtil.c: * generic/tclVar.c: * unix/tclUnixFCmd.c: * unix/tclUnixPipe.c: It is a poor practice to directly set or append to the value of the objResult of an interp, because that value might be shared, and in that circumstance a Tcl_Panic() will be the result. Searched for example of this practice and replaced with safer alternatives, often using the Tcl_AppendResult() routine that dkf just rehabilitated.
* Silence compiler warnings.dgp2004-06-081-4/+2
|
* Patch 922727 committed. Implements three changes:dgp2004-04-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | * generic/tclInt.h: Reworked the Tcl header files into a clean * unix/tclUnixPort.h: hierarchy where tcl.h < tclPort.h < tclInt.h * win/tclWinInt.h: and every C source file should #include * win/tclWinPort.h: at most one of those files to satisfy its declaration needs. tclWinInt.h and tclWinPort.h also better organized so that tclWinPort.h includes the Windows implementation of cross-platform declarations, while tclWinInt.h makes declarations that are available on Windows only. * generic/tclBinary.c (TCL_NO_MATH): Deleted the generic/tclMath.h * generic/tclMath.h (removed): header file. The internal Tcl * macosx/Makefile (PRIVATE_HEADERS): header, tclInt.h, has a * win/tcl.dsp: #include <math.h> directly, and file external to Tcl needing libm should do the same. * win/Makefile.in (WIN_OBJS): Deleted the win/tclWinMtherr.c file. * win/makefile.bc (TCLOBJS): It's a vestige from matherr() days * win/makefile.vc (TCLOBJS): gone by. * win/tcl.dsp: * win/tclWinMtherr.c (removed):
* * unix/tclUnixPipe.c: (macosx) use vfork() instead of fork() todas2003-02-211-1/+5
| | | | | create new processes, as recommended by to Apple (vfork can be up to 100 times faster thank fork on macosx).
* Changed all the Tcl_Platform* symbols to TclOS*; they weren't public so theirdkf2002-06-281-4/+4
| | | | names were really badly chosen. Also prevented a double-#def.
* TIP#72 implementation. See ChangeLog for details.dkf2002-02-151-4/+4
| | | | | This version builds clean on Solaris/SPARC, with GCC and CC, both with and without threads and both in 32-bit and 64-bit mode.
* * Partial TIP 27 rollback. Following routinesdgp2002-02-081-3/+2
| | | | | | | | | | | | | restored to return (char *): Tcl_DStringAppend, Tcl_DStringAppendElement, Tcl_JoinPath, Tcl_TranslateFileName, Tcl_ExternalToUtfDString, Tcl_UtfToExternalDString, Tcl_UniCharToUtfDString, Tcl_GetCwd, Tcl_WinTCharToUtf. Also restored Tcl_WinUtfToTChar to return (TCHAR *) and Tcl_UtfToUniCharDString to return (Tcl_UniChar *). Modified some callers. This change recognizes that Tcl_DStrings are de-facto white-box objects. * generic/tclCmdMZ.c: corrected use of C++-style comment.
* * Updated interfaces of generic/tclEncoding, generic/tclFilename.c,dgp2002-01-251-5/+7
| | | | | | | | | | | generic/tclIOUtil.c, generic/tclPipe.c, generic/tclResult.c, generic/tclUtil.c, generic/tclVar.c and mac/tclMacResource.c according to TIP 27. Tcl_TranslateFileName rewritten as wrapper around VFS-aware version. Updated callers. ***POTENTIAL INCOMPATIBILITY*** Includes source incompatibilities: argv arguments of Tcl_Concat, Tcl_JoinPath, Tcl_OpenCommandChannel, Tcl_Merge; argvPtr arguments of Tcl_SplitList and Tcl_SplitPath.
* * Updated APIs in the file generic/tclIO.c according to the guidelinesdgp2002-01-151-3/+3
| | | | | | | | | | | of TIP 27. Several minor documentation corrections as well. * Updated channel driver interface according to the guidelines of TIP 27. See also [Bug 500348]. * Moved Tcl_EolTranslation enum declaration from generic/tcl.h to generic/tclInt.h (renamed to TclEolTranslation). It is not used anywhere in Tcl's public interface.
* * unix/tclUnixPipe.c (TclpCreateProcess): Applied Don Porter'sandreas_kupries2001-12-111-2/+2
| | | | patch fixing bug #437489.
* * unix/tclUnixPipe.c (PipeInputProc, PipeOutputProc): do immediatehobbs2001-10-181-11/+27
| | | | | retry when error is returned with errno == EINTR. [Bug #415131] (leger)
* minor fs, vfs fixesvincentdarley2001-09-041-7/+17
|
* * unix/tclUnixPipe.c (TclpCreateTempFile): fixed use of tmpnam,hobbs2001-08-071-7/+14
| | | | | which is dangerous. [Patch: #442636] (lim) The use of tmpnam in TclpTempFileName must still be changed.
* Changes from TIP#17 "Redo Tcl's filesystem"vincentdarley2001-07-311-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following files were impacted. * doc/Access.3: * doc/FileSystem.3: * doc/OpenFileChnl.3: * doc/file.n: * doc/glob.n: * generic/tcl.decls: * generic/tcl.h: * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclDate.c: * generic/tclDecls.h: * generic/tclEncoding.c: * generic/tclFCmd.c: * generic/tclFileName.c: * generic/tclGetDate.y: * generic/tclIO.c: * generic/tclIOCmd.c: * generic/tclIOUtil.c: * generic/tclInt.decls: * generic/tclInt.h: * generic/tclIntDecls.h: * generic/tclLoad.c: * generic/tclStubInit.c: * generic/tclTest.c: * generic/tclUtil.c: * library/init.tcl: * mac/tclMacFCmd.c: * mac/tclMacFile.c: * mac/tclMacInit.c: * mac/tclMacPort.h: * mac/tclMacResource.c: * mac/tclMacTime.c: * tests/cmdAH.test: * tests/event.test: * tests/fCmd.test: * tests/fileName.test: * tests/io.test: * tests/ioCmd.test: * tests/proc-old.test: * tests/registry.test: * tests/unixFCmd.test: * tests/winDde.test: * tests/winFCmd.test: * unix/mkLinks: * unix/tclUnixFCmd.c: * unix/tclUnixFile.c: * unix/tclUnixInit.c: * unix/tclUnixPipe.c: * win/tclWinFCmd.c: * win/tclWinFile.c: * win/tclWinInit.c: * win/tclWinPipe.c
* * unix/tclUnixPipe.c: updated pipeChannelType tohobbs2001-05-151-11/+15
| | | | TCL_CHANNEL_VERSION_2 type specification.
* * unix/tclUnixPipe.c (TclpCreateTempFile): prevent potential racehobbs2001-03-291-2/+7
| | | | | condition and security leak in tmp filename creation. (max) [Patch #402924]
* * unix/tclUnixPipe.c (TclpCreateProcess): Removed WNOHANG fromhobbs2000-09-061-3/+5
| | | | | Tcl_WaitPid call in error case of process creation on Unix, as it would lead to defunct processes. [Bug: 6148]
* * generic/tclGet.c (Tcl_GetDouble): Added additional conditions toericm2000-03-311-4/+10
| | | | | | | | | | | | | | | | | error test (previously only errno was checked, but the return value of strtod() should be checked as well). [Bug: 4118]. * tests/exec.test: Added test for proper conversion of UTF data when used with "<< $dataWithUTF" on exec's. * unix/tclUnixPipe.c (TclpCreateTempFile): Added Tcl_UtfToExternalDString call, so that if there is UTF content in the string it will be properly converted to the system encoding before being written [Bug: 4030]. (TclpCreateTempFile): Added a check on the return value of tmpnam; some systems (Linux, for example) will start to return NULL after tmpnam has been called TMP_MAX times; not checking for this can have bad results (overwriting temp files, core dumps, etc.)
* * unix/tclUnixChan.c: Added (off_t) type casts in lseek() callericm2000-03-271-3/+3
| | | | | | | | [Bug: 4409]. * unix/tclLoadAout.c: * unix/tclUnixPipe.c: Added (off_t) type casts in lseek() calls [Bug: 4410].
* * unix/configure.in:hobbs1999-12-121-3/+3
| | | | | | | | | * unix/tcl.m4: * unix/tclUnixPipe.c: removed checking for compatible vfork function and use of the vfork function. Modern VM systems rarely suffer any performance degradation when fork is used, and it solves multiple problems with vfork. Users that still want vfork and add -Dfork=vfork to the compile flags. [Bug: 942 2228 1312]
* * win/tclWinTime.c: fixed handling of %Z on NT for time zoneshobbs1999-12-011-2/+1
| | | | that don't have DST.
* * unix/tclUnixPipe.c: fixed PipeBlockModeProc to properly sethobbs1999-11-301-2/+4
| | | | isNonBlocking flag on pipe. [Bug: 1356 710]
* * unix/Makefile.in: purify has to use -best-effort to instrumenthobbs1999-10-131-21/+28
| | | | | | | | * unix/tclAppInit.c: identified potential mem leak when compiling tcltest (not critical) * unix/tclUnixPipe.c: fixed mem leak in TclpCreateProcess when doing alloc between vfork and execvp. * unix/tclUnixTest.c: fixed mem leak in findexecutable test command
* merged tcl 8.1 branch back into the main trunkstanton1999-04-161-47/+56
|
* Replaced SCCS strings, fixed binary filescore_8_0_3stanton1998-09-141-1/+1
|
* Initial revisionrjohnson1998-03-261-0/+1149