X-Git-Url: https://git.realraum.at/?p=svn42.git;a=blobdiff_plain;f=dart%2Fttyread.c;h=beb88561a1328456179d4971cfe93ecbe4b22044;hp=65a6248ed05e83c87f948d0fc180a887fdbb4f4d;hb=b0f2556e0f18f6ded6a2b72bfda99b97023dfee6;hpb=e399e45bf41b101605391708534bb529e947ce44 diff --git a/dart/ttyread.c b/dart/ttyread.c index 65a6248..beb8856 100644 --- a/dart/ttyread.c +++ b/dart/ttyread.c @@ -51,7 +51,6 @@ int setup_tty(int fd) } tmio.c_lflag &= ~ECHO; - tmio.c_lflag &= ~ISIG; tmio.c_lflag |= CLOCAL; tmio.c_iflag &= ~ICRNL; @@ -109,7 +108,7 @@ int main(int argc, char* argv[]) char buf[100]; for(;;) { ssize_t r = read(fd, buf, sizeof(buf)); - if(r < 0 ) { + if(r <= 0) { perror("read()"); return r; }