diff options
author | das <das@noemail.net> | 2006-07-20 06:21:40 (GMT) |
---|---|---|
committer | das <das@noemail.net> | 2006-07-20 06:21:40 (GMT) |
commit | 8b7df9ac0470f1e2a1c1ad15dc7957c9c9d8dd2d (patch) | |
tree | 87aa93a682398fe04c4b734c7ea00049bf6fba02 /unix/tclUnixPipe.c | |
parent | f0603aa3a54f5ac7ad77585a652acbdc124fca7d (diff) | |
download | tcl-8b7df9ac0470f1e2a1c1ad15dc7957c9c9d8dd2d.zip tcl-8b7df9ac0470f1e2a1c1ad15dc7957c9c9d8dd2d.tar.gz tcl-8b7df9ac0470f1e2a1c1ad15dc7957c9c9d8dd2d.tar.bz2 |
* macosx/tclMacOSXNotify.c (Tcl_InitNotifier, Tcl_WaitForEvent): create
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.
FossilOrigin-Name: fc99321d6695fb452519db28ea6020c0fcaa3050
Diffstat (limited to 'unix/tclUnixPipe.c')
-rw-r--r-- | unix/tclUnixPipe.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index 0d3bd0b..de92407 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixPipe.c,v 1.23.2.5 2005/07/28 15:27:59 dkf Exp $ + * RCS: @(#) $Id: tclUnixPipe.c,v 1.23.2.6 2006/07/20 06:21:46 das Exp $ */ #include "tclInt.h" @@ -398,7 +398,7 @@ TclpCreateProcess(interp, argc, argv, inputFile, outputFile, errorFile, * process. */ { TclFile errPipeIn, errPipeOut; - int joinThisError, count, status, fd; + int count, status, fd; char errSpace[200 + TCL_INTEGER_SPACE]; Tcl_DString *dsArray; char **newArgv; @@ -430,9 +430,10 @@ TclpCreateProcess(interp, argc, argv, inputFile, outputFile, errorFile, newArgv[i] = Tcl_UtfToExternalDString(NULL, argv[i], -1, &dsArray[i]); } - joinThisError = errorFile && (errorFile == outputFile); pid = fork(); if (pid == 0) { + int joinThisError = errorFile && (errorFile == outputFile); + fd = GetFd(errPipeOut); /* |