summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2013-01-06 20:59:51 +0200
committerArnold D. Robbins <arnold@skeeve.com>2013-01-06 20:59:51 +0200
commit59ecb6715382d487887814d5d55577a141c2768c (patch)
treeca4fd0924e35ef3185de3f84fab1f1b0a724fe76 /io.c
parent8a03441d46abde264d2209799d9bca66a1d23b34 (diff)
downloadgawk-59ecb6715382d487887814d5d55577a141c2768c.tar.gz
Set name field for io extensions.
Diffstat (limited to 'io.c')
-rw-r--r--io.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/io.c b/io.c
index 0b008fc0..8b030ecb 100644
--- a/io.c
+++ b/io.c
@@ -771,6 +771,7 @@ redirect(NODE *redir_exp, int redirtype, int *errflg)
rp->value = str;
rp->flag = tflag;
init_output_wrapper(& rp->output);
+ rp->output.name = str;
rp->iop = NULL;
rp->pid = -1;
rp->status = 0;
@@ -1673,6 +1674,7 @@ two_way_open(const char *str, struct redirect *rp)
os_close_on_exec(fd, str, "socket", "to/from");
os_close_on_exec(newfd, str, "socket", "to/from");
rp->iop = iop_alloc(newfd, str, 0);
+ rp->output.name = str;
find_input_parser(rp->iop);
iop_finish(rp->iop);
if (! rp->iop->valid) {
@@ -1894,6 +1896,7 @@ two_way_open(const char *str, struct redirect *rp)
return false;
}
+ rp->output.name = str;
/*
* Force read and write ends of two-way connection to
* be different fd's so they can be closed independently.
@@ -2059,6 +2062,7 @@ use_pipes:
}
rp->output.fp = fdopen(ptoc[1], "w");
rp->output.mode = "w";
+ rp->output.name = str;
if (rp->output.fp == NULL) {
iop_close(rp->iop);
rp->iop = NULL;