Another bug fix: always set the busy flag when telling a subthread
[u/mdw/putty] / ssh.c
diff --git a/ssh.c b/ssh.c
index 1a7880c..969ffbc 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -1,7 +1,12 @@
+/*
+ * SSH backend.
+ */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
 #include <assert.h>
+#include <limits.h>
 
 #include "putty.h"
 #include "tree234.h"
@@ -8760,7 +8765,7 @@ static int ssh_return_exitcode(void *handle)
     if (ssh->s != NULL)
         return -1;
     else
-        return (ssh->exitcode >= 0 ? ssh->exitcode : 0);
+        return (ssh->exitcode >= 0 ? ssh->exitcode : INT_MAX);
 }
 
 /*