mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
pterm.c now relies on backend `exitcode' functions returning <0 when
the session is still connected, and not returning an exit code until after it's finished. [originally from svn r3033]
This commit is contained in:
parent
3a41ec782e
commit
9e59f4534b
4
raw.c
4
raw.c
@ -217,6 +217,10 @@ static void raw_provide_logctx(void *handle, void *logctx)
|
|||||||
|
|
||||||
static int raw_exitcode(void *handle)
|
static int raw_exitcode(void *handle)
|
||||||
{
|
{
|
||||||
|
Raw raw = (Raw) handle;
|
||||||
|
if (raw->s != NULL)
|
||||||
|
return -1; /* still connected */
|
||||||
|
else
|
||||||
/* Exit codes are a meaningless concept in the Raw protocol */
|
/* Exit codes are a meaningless concept in the Raw protocol */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
5
rlogin.c
5
rlogin.c
@ -284,7 +284,10 @@ static void rlogin_provide_logctx(void *handle, void *logctx)
|
|||||||
|
|
||||||
static int rlogin_exitcode(void *handle)
|
static int rlogin_exitcode(void *handle)
|
||||||
{
|
{
|
||||||
/* Rlogin rlogin = (Rlogin) handle; */
|
Rlogin rlogin = (Rlogin) handle;
|
||||||
|
if (rlogin->s != NULL)
|
||||||
|
return -1; /* still connected */
|
||||||
|
else
|
||||||
/* If we ever implement RSH, we'll probably need to do this properly */
|
/* If we ever implement RSH, we'll probably need to do this properly */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
5
telnet.c
5
telnet.c
@ -996,7 +996,10 @@ static void telnet_provide_logctx(void *handle, void *logctx)
|
|||||||
|
|
||||||
static int telnet_exitcode(void *handle)
|
static int telnet_exitcode(void *handle)
|
||||||
{
|
{
|
||||||
/* Telnet telnet = (Telnet) handle; */
|
Telnet telnet = (Telnet) handle;
|
||||||
|
if (telnet->s != NULL)
|
||||||
|
return -1; /* still connected */
|
||||||
|
else
|
||||||
/* Telnet doesn't transmit exit codes back to the client */
|
/* Telnet doesn't transmit exit codes back to the client */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user