add ~^Y to stop local side only (a la rlogin)
authorSam Leffler <sam@ucbvax.Berkeley.EDU>
Tue, 6 May 1986 02:01:38 +0000 (18:01 -0800)
committerSam Leffler <sam@ucbvax.Berkeley.EDU>
Tue, 6 May 1986 02:01:38 +0000 (18:01 -0800)
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
usr/src/usr.bin/tip/cmdtab.c

index 1f08f7c..fdec8af 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #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"
 #endif not lint
 
 #include "tip.h"
@@ -761,11 +761,12 @@ genbrk()
 /*
  * Suspend tip
  */
 /*
  * Suspend tip
  */
-suspend()
+suspend(c)
+       char c;
 {
 
        unraw();
 {
 
        unraw();
-       kill(0, SIGTSTP);
+       kill(c == CTRL(y) ? getpid() : 0, SIGTSTP);
        raw();
 }
 
        raw();
 }
 
index d44909a..339636b 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #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"
 #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 },
        { '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 },
        { 's',  NORM,   "set variable",                  variable },
        { '?',  NORM,   "get this summary",              help },
        { '#',  NORM,   "send break",                    genbrk },