From 72b2a7a51313d81ea64f26dc0dc872823a5cd4f3 Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Mon, 5 May 1986 18:01:38 -0800 Subject: [PATCH] add ~^Y to stop local side only (a la rlogin) SCCS-vsn: usr.bin/tip/cmds.c 5.4 SCCS-vsn: usr.bin/tip/cmdtab.c 5.3 --- usr/src/usr.bin/tip/cmds.c | 7 ++++--- usr/src/usr.bin/tip/cmdtab.c | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/usr/src/usr.bin/tip/cmds.c b/usr/src/usr.bin/tip/cmds.c index 1f08f7c71d..fdec8af687 100644 --- a/usr/src/usr.bin/tip/cmds.c +++ b/usr/src/usr.bin/tip/cmds.c @@ -5,7 +5,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)cmds.c 5.3 (Berkeley) %G%"; +static char sccsid[] = "@(#)cmds.c 5.4 (Berkeley) %G%"; #endif not lint #include "tip.h" @@ -761,11 +761,12 @@ genbrk() /* * Suspend tip */ -suspend() +suspend(c) + char c; { unraw(); - kill(0, SIGTSTP); + kill(c == CTRL(y) ? getpid() : 0, SIGTSTP); raw(); } diff --git a/usr/src/usr.bin/tip/cmdtab.c b/usr/src/usr.bin/tip/cmdtab.c index d44909a1da..339636b81c 100644 --- a/usr/src/usr.bin/tip/cmdtab.c +++ b/usr/src/usr.bin/tip/cmdtab.c @@ -5,7 +5,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)cmdtab.c 5.2 (Berkeley) %G%"; +static char sccsid[] = "@(#)cmdtab.c 5.3 (Berkeley) %G%"; #endif not lint #include "tip.h" @@ -28,7 +28,8 @@ esctable_t etable[] = { { 'c', NORM, "change directory", chdirectory }, { '.', NORM, "exit from tip", finish }, {CTRL(d),NORM, "exit from tip", finish }, - {CTRL(z),NORM, "suspend tip", suspend }, + {CTRL(y),NORM, "suspend tip (local+remote)", suspend }, + {CTRL(z),NORM, "suspend tip (local only)", suspend }, { 's', NORM, "set variable", variable }, { '?', NORM, "get this summary", help }, { '#', NORM, "send break", genbrk }, -- 2.20.1