]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
script: make sure errno is zero
authorKarel Zak <kzak@redhat.com>
Thu, 2 Jul 2015 08:30:10 +0000 (10:30 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 2 Jul 2015 08:30:10 +0000 (10:30 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
term-utils/script.c

index 990b4a1e780c0e1f2b573233da0171c5bc5c9c2e..9fdef2e2726ca5a73eb6d2de109a9ca63b991f6a 100644 (file)
@@ -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));