summaryrefslogtreecommitdiff
path: root/hurd
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1994-09-30 20:48:58 +0000
committerRoland McGrath <roland@gnu.org>1994-09-30 20:48:58 +0000
commit3df31235279c6fd6b51f978869449d42f54f9de8 (patch)
tree7f2075489895defb15ed238ecc1d12bdbf3c9117 /hurd
parent4efb255cc716ac6189b1c424289e109cf11ad7c7 (diff)
(_hurd_fd_read): Use ctty port for RPC if set.
Diffstat (limited to 'hurd')
-rw-r--r--hurd/fd-read.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hurd/fd-read.c b/hurd/fd-read.c
index 10326670df..acbb62c9e8 100644
--- a/hurd/fd-read.c
+++ b/hurd/fd-read.c
@@ -34,7 +34,8 @@ _hurd_fd_read (struct hurd_fd *fd, void *buf, size_t *nbytes)
({
do
{
- err = __io_read (port, &data, &nread, -1, *nbytes);
+ err = __io_read (ctty != MACH_PORT_NULL ? ctty : port,
+ &data, &nread, -1, *nbytes);
if (ctty != MACH_PORT_NULL && err == EBACKGROUND)
{
/* We are a background job and tried to read from the tty.