char *err;
Rlogin rlogin;
- rlogin = smalloc(sizeof(*rlogin));
+ rlogin = snew(struct rlogin_tag);
rlogin->fn = &fn_table;
rlogin->s = NULL;
rlogin->frontend = frontend_handle;
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 = {