Description: |
(text/x-fossil-wiki)
[https://www.tcl.tk/man/tcl/TclLib/OpenFileChnl.htm#M7]
states for Tcl_OpenCommandChannel():
<pre>
If an error occurs while opening the channel, [...] In addition,
Tcl_OpenCommandChannel leaves an error message in the interpreter's
result if interp is not NULL.
</pre>
The code in generic/TclPipe.c however states that interp cannot be NULL:
<pre>
Tcl_Channel
Tcl_OpenCommandChannel(
Tcl_Interp *interp, /* Interpreter for error reporting. Can NOT be NULL. */
</pre>
And indeed, calling Tcl_OpenCommandChannel(NULL, ...) dumps core in case of an error when opening the pipeline (e.g. command not found).
=> Documentation should be adjusted: "interp cannot be NULL".
|