the session is still connected, and not returning an exit code until
after it's finished.
[originally from svn r3033]
static int raw_exitcode(void *handle)
{
- /* Exit codes are a meaningless concept in the Raw protocol */
- return 0;
+ Raw raw = (Raw) handle;
+ if (raw->s != NULL)
+ return -1; /* still connected */
+ else
+ /* Exit codes are a meaningless concept in the Raw protocol */
+ return 0;
}
Backend raw_backend = {
static int rlogin_exitcode(void *handle)
{
- /* Rlogin rlogin = (Rlogin) handle; */
- /* If we ever implement RSH, we'll probably need to do this properly */
- return 0;
+ 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 */
+ return 0;
}
Backend rlogin_backend = {
static int telnet_exitcode(void *handle)
{
- /* Telnet telnet = (Telnet) handle; */
- /* Telnet doesn't transmit exit codes back to the client */
- return 0;
+ Telnet telnet = (Telnet) handle;
+ if (telnet->s != NULL)
+ return -1; /* still connected */
+ else
+ /* Telnet doesn't transmit exit codes back to the client */
+ return 0;
}
Backend telnet_backend = {