diff --git a/src/cmd/dial.c b/src/cmd/dial.c index c2b18f5f..e8e56902 100644 --- a/src/cmd/dial.c +++ b/src/cmd/dial.c @@ -45,7 +45,7 @@ main(int argc, char **argv) sysfatal("fork: %r"); case 0: while((n = read(0, buf, sizeof buf)) > 0) - if(write(0, buf, n) < 0) + if(write(fd, buf, n) < 0) break; if(!waitforeof) postnote(PNPROC, getppid(), "kill");