Changeset: 66cb63684c1c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/66cb63684c1c
Modified Files:
        clients/mapilib/mapi.c
Branch: client_interrupts
Log Message:

Fixed misplaced code, and removed dead code.


diffs (28 lines):

diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -4368,13 +4368,13 @@ read_into_cache(MapiHdl hdl, int lookahe
                check_stream(mid, mid->to, "write error on stream", mid->error);
        }
        if ((result = hdl->active) == NULL)
+               result = hdl->result;   /* may also be NULL */
 
        prev_handler = signal(SIGINT, compute_sigint_handler);
        if (prev_handler == SIG_ERR) {
                perror("mapi_execute_internal: could not install signal 
handler");
                prev_handler = NULL;
        }
-               result = hdl->result;   /* may also be NULL */
 
        for (;;) {
                line = read_line(mid);
@@ -4493,9 +4493,6 @@ read_into_cache(MapiHdl hdl, int lookahe
                        break;
                }
        }
-       if (prev_handler && signal(SIGINT, prev_handler) == SIG_ERR) {
-               perror("mapi_execute_internal: Could not restore previous 
handler.");
-       }
 }
 
 static MapiMsg
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to