The comments for
int
TclCreatePipeline(interp, argc, argv, pidArrayPtr,
inPipePtr,
outPipePtr, errFilePtr)
say that:
CONST char **argv; /* Array of strings describing
commands in
* pipeline plus I/O redirection with <,
* <<, >, etc. Argv[argc] must be NULL. */
But the documentation for Tcl_OpenFileChannel makes no
mention of this! Either the documentation should be
changed, or the command should dispense with the final
NULL requirement (it has an argc, so why does it need a
final NULL, too?).
Logged In: YES
user_id=75003
Note: David had a mem corruption issue and crash because of
this. The easy fix, updating the docs, might not be the
right fix.
This needs a deeper look.
Logged In: YES
user_id=240
I whipped up the following patch, which eliminates the
requirement for argv[argc] to exist and be NULL. It works
for me, and seems to pass the relevant tests. I've got a
nasty case of the flu, so my addled brain may have missed
something:-)
Logged In: YES
user_id=80530
Note that pre-patch, the
TclCreatePipeline routine
ignores the value of its
argc argument. Note also
the comment that the
routine is directly called
by BLT. Would be wise to
check whether BLT relies on
the argc value getting ignored.
Logged In: YES
user_id=240
I couldn't find TclCreatePipeline in the version of BLT that
ships with Debian: 2.4z
Logged In: YES
user_id=79902
OK, in that case (BLT no longer using it) just fix it so
that argv[argc] is never referred to.
Logged In: YES
user_id=75003
Accepted the patch and applied to both 8.4 and cvs head.