pty: fix wrong fd check

FDs may be 0 so check for >= and not > for fds.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-03-25 18:10:27 +02:00
parent 6bcc73666a
commit 0392fb8c49

View File

@ -188,7 +188,7 @@ static int setup_child(int master, struct winsize *ws)
err_out:
ret = -errno;
if (slave > 0)
if (slave >= 0)
close(slave);
close(master);
return ret;