]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - unix/uxplink.c
Rework handling of asynchronous connect(2) errors on Unix.
[PuTTY.git] / unix / uxplink.c
index 7721e4b673349180b1e3767a78323db23e18fd4b..bf55ea73e93b875ebf262edcdad1b913869b3c93 100644 (file)
@@ -305,6 +305,9 @@ char *get_ttymode(void *frontend, const char *mode)
 #endif
 #if defined(XCASE)
     GET_BOOL("XCASE", XCASE, c_lflag, );
+#endif
+#if defined(IUTF8)
+    GET_BOOL("IUTF8", IUTF8, c_iflag, );
 #endif
     /* Configuration of ECHO */
 #if defined(ECHOCTL)
@@ -591,7 +594,9 @@ static void usage(void)
 
 static void version(void)
 {
-    printf("plink: %s\n", ver);
+    char *buildinfo_text = buildinfo("\n");
+    printf("plink: %s\n%s\n", ver, buildinfo_text);
+    sfree(buildinfo_text);
     exit(1);
 }
 
@@ -946,6 +951,11 @@ int main(int argc, char **argv)
        perror("pipe");
        exit(1);
     }
+    /* We don't want the signal handler to block if the pipe's full. */
+    nonblock(signalpipe[0]);
+    nonblock(signalpipe[1]);
+    cloexec(signalpipe[0]);
+    cloexec(signalpipe[1]);
     putty_signal(SIGWINCH, sigwinch);
 
     /*
@@ -1114,6 +1124,9 @@ int main(int argc, char **argv)
             ret = select(maxfd, &rset, &wset, &xset, NULL);
         }
 
+        if (ret < 0 && errno == EINTR)
+            continue;
+
        if (ret < 0) {
            perror("select");
            exit(1);