mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Add a new back-end function to return the exit code of the remote
process. This is functional in SSH, and vestigial (just returns 0) in the other three protocols. Plink's Windows exit code is now determined by the remote process exit code, which should make it more usable in scripting applications. Tested in both SSH1 and SSH2. [originally from svn r1518]
This commit is contained in:
7
telnet.c
7
telnet.c
@ -848,6 +848,12 @@ static int telnet_ldisc(int option)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int telnet_exitcode(void)
|
||||
{
|
||||
/* Telnet doesn't transmit exit codes back to the client */
|
||||
return 0;
|
||||
}
|
||||
|
||||
Backend telnet_backend = {
|
||||
telnet_init,
|
||||
telnet_send,
|
||||
@ -855,6 +861,7 @@ Backend telnet_backend = {
|
||||
telnet_size,
|
||||
telnet_special,
|
||||
telnet_socket,
|
||||
telnet_exitcode,
|
||||
telnet_sendok,
|
||||
telnet_ldisc,
|
||||
telnet_unthrottle,
|
||||
|
Reference in New Issue
Block a user