Skip to content

Commit

Permalink
pty: fix using right fd
Browse files Browse the repository at this point in the history
Use right fd when spawning child process.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
  • Loading branch information
David Herrmann committed Mar 25, 2012
1 parent 5cdf947 commit 3935a77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pty.c
Expand Up @@ -313,7 +313,7 @@ int kmscon_pty_open(struct kmscon_pty *pty, unsigned short width,
return -errno; return -errno;
} }


ret = ev_eloop_new_fd(pty->eloop, &pty->efd, pty->fd, ret = ev_eloop_new_fd(pty->eloop, &pty->efd, master,
EV_READABLE, pty_input, pty); EV_READABLE, pty_input, pty);
if (ret) if (ret)
goto err_master; goto err_master;
Expand Down Expand Up @@ -371,7 +371,7 @@ int kmscon_pty_write(struct kmscon_pty *pty, const char *u8, size_t len)
buf: buf:
ret = kmscon_ring_write(pty->msgbuf, u8, len); ret = kmscon_ring_write(pty->msgbuf, u8, len);
if (ret) if (ret)
log_warn("cannot allocate buffer; dropping input"); log_warn("cannot allocate buffer; dropping output");


return 0; return 0;
} }
Expand Down

0 comments on commit 3935a77

Please sign in to comment.