summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixPipe.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-06-12 10:50:02 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-06-12 10:50:02 (GMT)
commitf4e00815317486febb5b02717230959f5dae9b12 (patch)
tree36d5e990649bfa8e208e2b110b2f266639f1bd00 /unix/tclUnixPipe.c
parent4288708411d620a3a41d652fcfe79d4d48bff0c2 (diff)
parent167b17afd33ac6f26b934d20678b73fc3a35aec7 (diff)
downloadtcl-f4e00815317486febb5b02717230959f5dae9b12.zip
tcl-f4e00815317486febb5b02717230959f5dae9b12.tar.gz
tcl-f4e00815317486febb5b02717230959f5dae9b12.tar.bz2
Merge 8.6
Diffstat (limited to 'unix/tclUnixPipe.c')
-rw-r--r--unix/tclUnixPipe.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c
index 32fc631..a2b5c11 100644
--- a/unix/tclUnixPipe.c
+++ b/unix/tclUnixPipe.c
@@ -78,23 +78,23 @@ static int SetupStdFile(TclFile file, int type);
*/
static const Tcl_ChannelType pipeChannelType = {
- "pipe", /* Type name. */
- TCL_CHANNEL_VERSION_5, /* v5 channel */
- TCL_CLOSE2PROC, /* Close proc. */
- PipeInputProc, /* Input proc. */
- PipeOutputProc, /* Output proc. */
- NULL, /* Seek proc. */
+ "pipe",
+ TCL_CHANNEL_VERSION_5,
+ TCL_CLOSE2PROC, /* Deprecated. */
+ PipeInputProc,
+ PipeOutputProc,
+ NULL, /* Deprecated. */
NULL, /* Set option proc. */
NULL, /* Get option proc. */
- PipeWatchProc, /* Initialize notifier. */
- PipeGetHandleProc, /* Get OS handles out of channel. */
- PipeClose2Proc, /* close2proc. */
- PipeBlockModeProc, /* Set blocking or non-blocking mode.*/
- NULL, /* flush proc. */
- NULL, /* handler proc. */
- NULL, /* wide seek proc */
- NULL, /* thread action proc */
- NULL /* truncation */
+ PipeWatchProc,
+ PipeGetHandleProc,
+ PipeClose2Proc,
+ PipeBlockModeProc,
+ NULL, /* Flush proc. */
+ NULL, /* Bubbled event handler proc. */
+ NULL, /* Seek proc. */
+ NULL, /* Thread action proc. */
+ NULL /* Truncation proc. */
};
/*
@@ -827,7 +827,7 @@ TclpCreateCommandChannel(
* background exec). */
{
char channelName[16 + TCL_INTEGER_SPACE];
- int channelId;
+ int fd;
PipeState *statePtr = (PipeState *)ckalloc(sizeof(PipeState));
int mode;
@@ -851,13 +851,13 @@ TclpCreateCommandChannel(
*/
if (readFile) {
- channelId = GetFd(readFile);
+ fd = GetFd(readFile);
} else if (writeFile) {
- channelId = GetFd(writeFile);
+ fd = GetFd(writeFile);
} else if (errorFile) {
- channelId = GetFd(errorFile);
+ fd = GetFd(errorFile);
} else {
- channelId = 0;
+ fd = 0;
}
/*
@@ -866,7 +866,7 @@ TclpCreateCommandChannel(
* natural to use "pipe%d".
*/
- snprintf(channelName, sizeof(channelName), "file%d", channelId);
+ snprintf(channelName, sizeof(channelName), "file%d", fd);
statePtr->channel = Tcl_CreateChannel(&pipeChannelType, channelName,
statePtr, mode);
return statePtr->channel;
@@ -1388,7 +1388,7 @@ Tcl_PidObjCmd(
TclNewObj(resultPtr);
for (i = 0; i < pipePtr->numPids; i++) {
Tcl_ListObjAppendElement(NULL, resultPtr,
- Tcl_NewWideIntObj(PTR2INT(TclpGetPid(pipePtr->pidPtr[i]))));
+ Tcl_NewWideIntObj(TclpGetPid(pipePtr->pidPtr[i])));
}
Tcl_SetObjResult(interp, resultPtr);
}