]> andersk Git - moira.git/blobdiff - gdb/gdb_conn.c
don't coredump on a DECstation when moira server is down
[moira.git] / gdb / gdb_conn.c
index 72078d374b5814c2b91474c372a5294a53dc671a..cecc0b99bd798af0f327f9bb9e03157253cfb084 100644 (file)
@@ -793,9 +793,9 @@ CONNECTION con;
        /*
         * Remove the file descriptor from the select bit maps
         */
-       if (!(con->in.flags & HCON_UNUSED))
+       if (!(con->in.flags & HCON_UNUSED) && con->in.fd >= 0)
                FD_CLR(con->in.fd,  &gdb_crfds);
-       if (!(con->out.flags & HCON_UNUSED))
+       if (!(con->out.flags & HCON_UNUSED) && con->out.fd >= 0)
                FD_CLR(con->out.fd, &gdb_cwfds);
        /*
         * Close the file descriptor.  Note, this presumes that in fact
This page took 0.032589 seconds and 4 git commands to generate.