summaryrefslogtreecommitdiffstats
path: root/term-utils/script.c
diff options
context:
space:
mode:
authorKarel Zak2015-07-02 10:30:10 +0200
committerKarel Zak2015-07-02 10:30:10 +0200
commite831c8767036106b2c0066e0ad85e4f83748857b (patch)
tree0190c9397e35d488f4666915417b1373a303f49d /term-utils/script.c
parentswapon: fix restart waitpid with errno == EINTR (diff)
downloadkernel-qcow2-util-linux-e831c8767036106b2c0066e0ad85e4f83748857b.tar.gz
kernel-qcow2-util-linux-e831c8767036106b2c0066e0ad85e4f83748857b.tar.xz
kernel-qcow2-util-linux-e831c8767036106b2c0066e0ad85e4f83748857b.zip
script: make sure errno is zero
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'term-utils/script.c')
-rw-r--r--term-utils/script.c1
1 files changed, 1 insertions, 0 deletions
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));