ii

git clone https://orangeshoelaces.net/git/ii.git

8f78d60c5b30e4e882c2b2740f693d2f70036eb5

Author: Nico Golde on 01/30/2007

Committer: Nico Golde on 01/30/2007

fixed fd exhausting

Stats

ii.c | 1 +
1 file changed, 1 insertion(+)

Patch

diff --git a/ii.c b/ii.c
index 2e68489..3692b3e 100644
--- a/ii.c
+++ b/ii.c
@@ -401,6 +401,7 @@ static void handle_channels_input(Channel *c)
 {
 	static char buf[PIPE_BUF];
 	if(read_line(c->fd, PIPE_BUF, buf) == -1) {
+		close(c->fd);
 		int fd = open_channel(c->name);
 		if(fd != -1)
 			c->fd = fd;