[29565] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit: Improve EINTR handling in bttest

daemon@ATHENA.MIT.EDU (Tom Yu)
Tue Aug 16 21:46:17 2016

Date: Tue, 16 Aug 2016 21:46:13 -0400
From: Tom Yu <tlyu@mit.edu>
Message-Id: <201608170146.u7H1kDQr026778@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/dbf6e70d04c094b6cf0ef076a62ef4ca27001183
commit dbf6e70d04c094b6cf0ef076a62ef4ca27001183
Author: Tom Yu <tlyu@mit.edu>
Date:   Mon Aug 8 09:12:16 2016 -0400

    Improve EINTR handling in bttest
    
    The libdb2 btree debugging program bttest doesn't handle EINTR in its
    input loop.  This causes difficulties with debugging using lldb,
    because bttest gets signals like SIGSTOP when being attached, and lldb
    doesn't seem to share the terminal well with a program being debugged.
    
    ticket: 8478 (new)
    subject: usability improvements for bttest

 src/plugins/kdb/db2/libdb2/test/btree.tests/main.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/plugins/kdb/db2/libdb2/test/btree.tests/main.c b/src/plugins/kdb/db2/libdb2/test/btree.tests/main.c
index 0d78d59..2aee3a3 100644
--- a/src/plugins/kdb/db2/libdb2/test/btree.tests/main.c
+++ b/src/plugins/kdb/db2/libdb2/test/btree.tests/main.c
@@ -232,8 +232,14 @@ user(db)
 	for (last = 0;;) {
 		(void)printf("> ");
 		(void)fflush(stdout);
-		if ((lbuf = fgets(&buf[0], 512, ifp)) == NULL)
+		if ((lbuf = fgets(&buf[0], 512, ifp)) == NULL) {
+			(void)printf("\n");
+			if (ferror(ifp) && errno == EINTR) {
+				clearerr(ifp);
+				continue;
+			}
 			break;
+		}
 		if (lbuf[0] == '\n') {
 			i = last;
 			goto uselast;
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post