All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 4f676455 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Minor fix when socket based tip fails, and we revert to tty based;

Need to reset the getremote state so that we can do a second search
in /etc/remote file.
parent 76b40069
......@@ -36,7 +36,7 @@
static char sccsid[] = "@(#)cmdtab.c 8.1 (Berkeley) 6/6/93";
#endif
static const char rcsid[] =
"$Id: cmdtab.c,v 1.2 2000-12-27 00:49:33 mike Exp $";
"$Id: cmdtab.c,v 1.3 2001-08-16 16:33:27 stoller Exp $";
#endif /* not lint */
#include "tip.h"
......@@ -49,6 +49,7 @@ esctable_t etable[] = {
{ '!', NORM, "shell", shell },
{ 'c', NORM, "change directory", chdirectory },
{ '.', NORM, "exit from tip", finish },
{ ',', NORM, "exit from tip", finish },
{CTRL('d'),NORM,"exit from tip", finish },
{CTRL('y'),NORM,"suspend tip (local+remote)", suspend },
{CTRL('z'),NORM,"suspend tip (local only)", suspend },
......
......@@ -36,7 +36,7 @@
static char sccsid[] = "@(#)hunt.c 8.1 (Berkeley) 6/6/93";
#endif
static const char rcsid[] =
"$Id: hunt.c,v 1.6 2001-08-14 19:05:12 stoller Exp $";
"$Id: hunt.c,v 1.7 2001-08-16 16:33:27 stoller Exp $";
#endif /* not lint */
#ifdef USESOCKETS
......@@ -172,9 +172,10 @@ socket_hunt(name)
}
alarm(0);
if (FD < 0) {
warn("%s", name);
deadfl = 1;
}
if (deadfl)
getremote_reset();
signal(SIGALRM, f);
return (deadfl ? -1 : 0);
}
......
......@@ -43,7 +43,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)remote.c 8.1 (Berkeley) 6/6/93";
#endif
static const char rcsid[] =
"$Id: remote.c,v 1.2 2000-12-27 00:49:35 mike Exp $";
"$Id: remote.c,v 1.3 2001-08-16 16:33:27 stoller Exp $";
#endif /* not lint */
#include "tip.h"
......@@ -258,13 +258,14 @@ getremcap(host)
ET = 10;
}
static int lookedup = 0;
char *
getremote(host)
char *host;
{
register char *cp;
static char *next;
static int lookedup = 0;
if (!lookedup) {
if (host == NOSTR && (host = getenv("HOST")) == NOSTR)
......@@ -289,3 +290,12 @@ getremote(host)
}
return (DV);
}
void
getremote_reset()
{
lookedup = 0;
DV = 0;
BR = 0;
HW = 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment