summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixPipe.c
Commit message (Collapse)AuthorAgeFilesLines
* Simplify use of "struct" keyword in many places.jan.nijtmans2016-06-301-1/+1
|
* Remove a number of eol-spaces. No change in functionality.jan.nijtmans2014-11-141-2/+2
|
* [1211aceef2] Fix refcount management of TclpTempFileName() that caused leak.dgp2014-07-111-2/+4
|
* Correct the interest masks in the Tcl_CreateFileHandler() calls in ↵dgp2014-05-311-2/+2
|\ | | | | | | PipeWatchProc(). When we are interested in both readable and writable events of a command pipeline channel, we only want the readable from the read end of the pipe, and the writable from the write end of the pipe.
| * Correct the interest masks in the Tcl_CreateFileHandler() calls indgp2014-05-311-2/+2
| | | | | | | | | | PipeWatchProc(). When we are interested in both readable and writable events of a command pipeline channel, we only want the readable from the read end of the pipe, and the writable from the write end of the pipe.
| * * unix/tclUnixPipe.c (DefaultTempDir): [Bug 2933003]: Allow overridingdkf2012-11-141-2/+51
| |\ | | | | | | | | | | | | | | | of the back-stop default temporary file location at compile time by setting the TCL_TEMPORARY_FILE_DIRECTORY #def to a string containing the directory name (defaults to "/tmp" as that is the most common default).
| | * Backport from Tcl 8.6.dkf2012-11-141-2/+40
| | | | | | | | | | | | | | | | | | | | | * unix/tclUnixPipe.c (DefaultTempDir): [Bug 2933003]: Allow overriding of the back-stop default temporary file location at compile time by setting the TCL_TEMPORARY_FILE_DIRECTORY #def to a string containing the directory name (defaults to "/tmp" as that is the most common default).
* | | * unix/tclUnixFCmd.c (TclUnixOpenTemporaryFile): [Bug 2933003]: Factordkf2012-11-141-32/+11
| | | | | | | | | | | | | | | | | | | | | out all the code to do temporary file creation so that it is possible to make it correct in one place. Allow overriding of the back-stop default temporary file location at compile time by setting the TCL_TEMPORARY_FILE_DIRECTORY #def to a string containing the directory name (defaults to "/tmp" as that is the most common default).
* | | Final part of result generation conversion (modulo any minor blunders)dkf2012-08-051-31/+33
| | |
* | | Purge use of Tcl_AppendElement, and corrected conversion of PIDs to integerdkf2012-07-311-9/+11
| | | | | | | | | objects.
* | | 1189293 Make "<<" binary safe.dgp2012-07-051-1/+1
|\ \ \ | |/ /
| * | 1189293 Make "<<" binary safe.dgp2012-07-051-1/+1
| |\ \ | | |/
| | * 1189293 Make '<<' redirects binary safe. Don't use strlen() (or equivalent)bug_1189293dgp2012-07-021-1/+1
| | | | | | | | | to find end of written data bytes.
* | | Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-4/+4
| | | | | | | | | rest of Tcl source code. No ABI change. API change *should* be harmless.
* | | Now that we're no longer using SCM based on RCS, the RCS Keyword linesdgp2011-03-021-2/+0
|\ \ \ | |/ / | | | cause more harm than good. Purged them (except in zlib files).
| * | Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-021-2/+0
| |\ \ | | |/ | | | more harm than good. Purged them.
| | * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-011-2/+0
| | | | | | | | | more harm than good. Purged them.
| | * * 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.
| | * * macosx/tclMacOSXNotify.c (Tcl_InitNotifier, Tcl_WaitForEvent): createdas2006-07-201-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | notifier thread lazily upon first call to Tcl_WaitForEvent() rather than in Tcl_InitNotifier(). Allows calling exeve() in processes where the event loop has not yet been run (Darwin's execve() fails in processes with more than one thread), in particular allows embedders to call fork() followed by execve(), previously the pthread_atfork() child handler's call to Tcl_InitNotifier() would immediately recreate the notifier thread in the child after a fork. * macosx/tclMacOSXNotify.c (Tcl_InitNotifier): add support for * unix/tclUnixFCmd.c (DoRenameFile, CopyFileAtts): weakly importing * unix/tclUnixInit.c (TclpSetInitialEncodings): symbols not available on OSX 10.2 or 10.3, enables binaires built on later OSX versions to run on earlier ones. * macosx/README: document how to enable weak-linking; cleanup. * unix/tclUnixPort.h: add support for weak-linking; conditionalize AvailabilityMacros.h inclusion; only disable realpath on 10.2 or earlier when threads are enabled. * unix/tclLoadDyld.c (TclpLoadMemoryGetBuffer): change runtime Darwin * unix/tclUnixInit.c (TclpInitPlatform): release check to use global initialized once. * unix/tclUnixFCmd.c (DoRenameFile, TclpObjNormalizePath): add runtime Darwin release check to determine if realpath is threadsafe. * unix/configure.in: add check on Darwin for compiler support of weak * unix/tcl.m4: import and for AvailabilityMacros.h header; move Darwin specific checks & defines that are only relevant to the tcl build out of tcl.m4; restrict framework option to Darwin; cleanup quoting. * unix/configure: autoconf-2.13 * unix/tclLoadDyld.c (TclpLoadMemory): * unix/tclUnixPipe.c (TclpCreateProcess): fix signed-with-unsigned comparison and other warnings from gcc4 -Wextra.
| | * Backport of fix for [Bug 1245953]dkf2005-07-281-2/+2
| | |
| | * bug 1225727Kevin B Kenny2005-06-221-1/+22
| | |
| | * 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: * mac/tclMacChan.c:
| | * silence compiler warningdgp2004-06-081-2/+2
| | |
| | * Silence compiler warningsdgp2004-06-081-3/+1
| | |
| * | Use correct TCL_LL_MODIFIER for CYGWIN.nijtmans2010-01-291-8/+25
| | | | | | | | | | | | | | | Formatting (all backported from HEAD) Fix gcc 4.4 warning: ignoring return value of ‘write’,
* | | Move TCHAR fallback typedef from tcl.h to tclPlatDecls.h (as suggested by dgp)nijtmans2010-04-221-2/+2
| | | | | | | | | | | | Eliminate various unnecessary type casts.
* | | * generic/tcl.decls: [TIP #357]: First round of changesKevin B Kenny2010-04-021-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclDecls.h: to export Tcl_LoadFile, Tcl_FindSymbol, * generic/tclIOUtil.c: and Tcl_FSUnloadFile to the public API. * generic/tclInt.h: * generic/tclLoad.c: * generic/tclLoadNone.c: * generic/tclStubInit.c: * tests/fileSystem.test: * tests/load.test: * tests/unload.test: * unix/tclLoadDl.c: * unix/tclLoadDyld.c: * unix/tclLoadNext.c: * unix/tclLoadOSF.c: * unix/tclLoadShl.c: * unix/tclUnixPipe.c: * win/Makefile.in: * win/tclWinLoad.c:
* | | * win/tclWinDde.c: VC++ 6.0 doesn't havenijtmans2010-01-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * win/tclWinReg.c PDWORD_PTR * win/tclWinThrd.c: Fix various minor gcc warnings. * win/tclWinTime.c * win/tclWinConsole.c Put channel type definitions * win/tclWinChan.c in static const memory * win/tclWinPipe.c * win/tclWinSerial.c * win/tclWinSock.c * generic/tclIOGT.c * generic/tclIORChan.c * generic/tclIORTrans.c * unix/tclUnixChan.c * unix/tclUnixPipe.c * unix/tclUnixSock.c * unix/configure (regenerated with autoconf 2.59) * tests/info.test: Make test independant from tcltest implementation.
* | | Fix gcc warning: ignoring return value of ‘write’,nijtmans2009-12-161-3/+10
| | | | | | | | | | | | | | | | | | declared with attribute warn_unused_result CONSTify functions TclpGetUserHome and TclSetPreInitScript (TIP #27)
* | | Some small bits of tidying up.dkf2009-11-091-70/+71
| | |
* | | Style fixes (unfouling whitespace, sorting comments, removing useless casts, ↵dkf2009-01-091-2/+2
| | | | | | | | | | | | etc.)
* | | Remove obsolete PipeCloseProcferrieux2008-12-181-83/+1
| | |
* | | TIP #332 IMPLEMENTATION - Half-Close for Bidirectional Channelsferrieux2008-12-181-6/+98
| | |
* | | Fix missing CLOEXEC on internal pipes [2417695] and [chan pipe] fds.ferrieux2008-12-121-1/+4
| | |
* | | fix warnings, formattingdas2008-07-211-18/+17
| | |
* | | TIP #304 implementationferrieux2008-07-211-1/+45
|/ /
* | * 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
| |