]> andersk Git - openssh.git/blobdiff - cli.c
- markus@cvs.openbsd.org 2001/03/23 14:28:32
[openssh.git] / cli.c
diff --git a/cli.c b/cli.c
index 915b34b14344fef8e7a04d77941075b2b7e302cb..d0f0cf3ffaeb1fc19c46e3341363ed2ebdc896e7 100644 (file)
--- a/cli.c
+++ b/cli.c
@@ -1,4 +1,4 @@
-/*     $OpenBSD: cli.c,v 1.10 2001/03/01 03:38:33 deraadt Exp $        */
+/*     $OpenBSD: cli.c,v 1.11 2001/03/06 00:33:04 deraadt Exp $        */
 
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: cli.c,v 1.10 2001/03/01 03:38:33 deraadt Exp $");
+RCSID("$OpenBSD: cli.c,v 1.11 2001/03/06 00:33:04 deraadt Exp $");
 
 #include "xmalloc.h"
 #include "log.h"
@@ -134,12 +134,16 @@ cli_read(char* buf, int size, int echo)
 {
        char ch = 0;
        int i = 0;
+       int n;
 
        if (!echo)
                cli_echo_disable();
 
        while (ch != '\n') {
-               if (read(cli_input, &ch, 1) != 1)
+               n = read(cli_input, &ch, 1);
+               if (n == -1 && (errno == EAGAIN || errno == EINTR))
+                       continue;
+               if (n != 1)
                        break;
                if (ch == '\n' || intr != 0)
                        break;
This page took 0.037489 seconds and 4 git commands to generate.