Changeset: 3057defd78b7 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/3057defd78b7
Modified Files:
clients/mapiclient/mclient.c
Branch: client_interrupts
Log Message:
Deal with interrupts when not using readline.
diffs (21 lines):
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -2382,7 +2382,16 @@ doFile(Mapi mid, stream *fp, bool useins
for (;;) {
ssize_t l;
char *newbuf;
- l = mnstr_readline(fp, buf + length, bufsiz - length);
+#ifndef HAVE_LIBREADLINE
+ do {
+ state = READING;
+ mnstr_clearerr(fp);
+#endif
+ l = mnstr_readline(fp, buf + length, bufsiz -
length);
+#ifndef HAVE_LIBREADLINE
+ } while (l == -1 && state == IDLING);
+ state = IDLING;
+#endif
if (l <= 0)
break;
if (!seen_null_byte && strlen(buf + length) < (size_t)
l) {
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]