Don't complain if !-escape entered, but no API using command is run.
authorGregory Minshall <minshall@ucbvax.Berkeley.EDU>
Wed, 31 May 1989 13:53:51 +0000 (05:53 -0800)
committerGregory Minshall <minshall@ucbvax.Berkeley.EDU>
Wed, 31 May 1989 13:53:51 +0000 (05:53 -0800)
SCCS-vsn: usr.bin/tn3270/sys_curses/system.c 4.2

usr/src/usr.bin/tn3270/sys_curses/system.c

index 5ae20c0..d1acc38 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)system.c   4.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)system.c   4.2 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -25,12 +25,12 @@ static char sccsid[] = "@(#)system.c        4.1 (Berkeley) %G%";
 #define fd_set fdset_t
 #endif  /* defined(pyr) */
 
 #define fd_set fdset_t
 #endif  /* defined(pyr) */
 
-#if    !defined(sun) && !defined(pyr)
-#include <sys/inode.h>
-#else  /* !defined(sun) */
+/*
+ * Wouldn't it be nice if these REALLY were in <sys/inode.h>?  Or,
+ * equivalently, if <sys/inode.h> REALLY existed?
+ */
 #define        IREAD   00400
 #define        IWRITE  00200
 #define        IREAD   00400
 #define        IWRITE  00200
-#endif /* !defined(sun) */
 
 #include <sys/file.h>
 #include <sys/time.h>
 
 #include <sys/file.h>
 #include <sys/time.h>
@@ -493,6 +493,11 @@ shell_continue()
            kill_connection();
            return -1;
        }
            kill_connection();
            return -1;
        }
+       /* At this point, it is possible that we've gone away */
+       if (shell_active == 0) {
+           kill_connection();
+           return -1;
+       }
        if (api_exch_init(sock, "server") == -1) {
            return -1;
        }
        if (api_exch_init(sock, "server") == -1) {
            return -1;
        }