From f7c9d7b6986678dc1be12199492d97ff2624c2d8 Mon Sep 17 00:00:00 2001 From: Fernando Nasser Date: Fri, 15 Sep 2000 20:40:15 +0000 Subject: [PATCH] 2000-09-15 Fernando Nasser * ser-unix.c (do_unix_readchar): Prevent infinite read wait to be interrupted after 32K seconds. --- gdb/ChangeLog | 5 +++++ gdb/ser-unix.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3ce502690d..82bde3efb7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2000-09-15 Fernando Nasser + + * ser-unix.c (do_unix_readchar): Prevent infinite read wait to be + interrupted after 32K seconds. + 2000-09-15 Kevin Buettner * language.c (show_case_command, set_case_command): Protoize. diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c index 5a1ec1dc14..73555b27a0 100644 --- a/gdb/ser-unix.c +++ b/gdb/ser-unix.c @@ -927,7 +927,7 @@ do_unix_readchar (serial_t scb, int timeout) } status = ser_unix_wait_for (scb, delta); - timeout -= delta; + timeout = (timeout <= 0) ? timeout : (timeout - delta); /* If we got a character or an error back from wait_for, then we can break from the loop before the timeout is completed. */ -- 2.34.1