mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Return a non-zero exit code in the event of a fatal-error SSH
session termination. `Close window only on clean exit' was not working properly on Unix in the absence of this: notify_remote_exit() was being called and ssh_return_exitcode was returning zero, causing gtk_main_quit() to be called, _before_ connection_fatal() happened. [originally from svn r6801]
This commit is contained in:
parent
44a246aaa7
commit
2d633388a1
3
ssh.c
3
ssh.c
@ -6,6 +6,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "putty.h"
|
||||
#include "tree234.h"
|
||||
@ -8764,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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user