X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fuxplink.c;h=6f17b5a2d33c0f03443bab46aaccf94d8ec4a27b;hb=6c81ee6706f75ccab7bc285d00139126524cce36;hp=d144cb9f41aa52deb1a46a90357baaa75a18de02;hpb=43c4ff62d71377052e39d62cb42536267cebe46e;p=PuTTY.git diff --git a/unix/uxplink.c b/unix/uxplink.c index d144cb9f..6f17b5a2 100644 --- a/unix/uxplink.c +++ b/unix/uxplink.c @@ -73,8 +73,6 @@ static Config cfg; */ char *platform_default_s(const char *name) { - if (!strcmp(name, "X11Display")) - return dupstr(getenv("DISPLAY")); if (!strcmp(name, "TermType")) return dupstr(getenv("TERM")); if (!strcmp(name, "UserName")) @@ -232,6 +230,7 @@ static void usage(void) printf(" -C enable compression\n"); printf(" -i key private key file for authentication\n"); printf(" -s remote command is an SSH subsystem (SSH-2 only)\n"); + printf(" -N don't start a shell/command (SSH-2 only)\n"); exit(1); } @@ -253,6 +252,7 @@ int main(int argc, char **argv) int errors; int use_subsystem = 0; void *ldisc, *logctx; + long now; ssh_get_line = console_get_line; @@ -585,6 +585,7 @@ int main(int argc, char **argv) atexit(cleanup_termios); ldisc_update(NULL, 1, 1); sending = FALSE; + now = GETTICKCOUNT(); while (1) { fd_set rset, wset, xset; @@ -645,7 +646,23 @@ int main(int argc, char **argv) } do { - ret = select(maxfd, &rset, &wset, &xset, NULL); + long next, ticks; + struct timeval tv, *ptv; + + if (run_timers(now, &next)) { + ticks = next - GETTICKCOUNT(); + if (ticks < 0) ticks = 0; /* just in case */ + tv.tv_sec = ticks / 1000; + tv.tv_usec = ticks % 1000 * 1000; + ptv = &tv; + } else { + ptv = NULL; + } + ret = select(maxfd, &rset, &wset, &xset, ptv); + if (ret == 0) + now = next; + else + now = GETTICKCOUNT(); } while (ret < 0 && errno == EINTR); if (ret < 0) {