From e831c8767036106b2c0066e0ad85e4f83748857b Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 2 Jul 2015 10:30:10 +0200 Subject: script: make sure errno is zero Signed-off-by: Karel Zak --- term-utils/script.c | 1 + 1 file changed, 1 insertion(+) (limited to 'term-utils/script.c') diff --git a/term-utils/script.c b/term-utils/script.c index 990b4a1e7..9fdef2e27 100644 --- a/term-utils/script.c +++ b/term-utils/script.c @@ -322,6 +322,7 @@ static void handle_io(struct script_control *ctl, int fd, int *eof) DBG(IO, ul_debug("%d FD active", fd)); *eof = 0; + errno = 0; /* read from active FD */ bytes = read(fd, buf, sizeof(buf)); -- cgit v1.2.3-55-g7522