SOCKET *sklist;
int skcount, sksize;
int connopen;
+ int exitcode;
char extra_portfwd[sizeof(cfg.portfwd)];
ssh_get_line = get_line;
break; /* we closed the connection */
}
WSACleanup();
- return 0;
+ exitcode = back->exitcode();
+ if (exitcode < 0) {
+ fprintf(stderr, "Remote process exit code unavailable\n");
+ exitcode = 1; /* this is an error condition */
+ }
+ return exitcode;
}