diff options
author | rsc <devnull@localhost> | 2004-09-20 15:08:57 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2004-09-20 15:08:57 +0000 |
commit | e5c26b01f70303f3322ac98d670ef886a62ac38a (patch) | |
tree | 60ad947a32a9607e03d26e51f46f72a00581fa6b /src/cmd | |
parent | dcc9531c5a8d5d43d71060f8975d592c7598b349 (diff) | |
download | plan9port-e5c26b01f70303f3322ac98d670ef886a62ac38a.tar.gz plan9port-e5c26b01f70303f3322ac98d670ef886a62ac38a.tar.bz2 plan9port-e5c26b01f70303f3322ac98d670ef886a62ac38a.zip |
various forgotten files
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/9term/9term.c | 20 | ||||
-rw-r--r-- | src/cmd/rio/menu.c | 3 |
2 files changed, 17 insertions, 6 deletions
diff --git a/src/cmd/9term/9term.c b/src/cmd/9term/9term.c index 469aea46..51e733ab 100644 --- a/src/cmd/9term/9term.c +++ b/src/cmd/9term/9term.c @@ -879,6 +879,20 @@ key(Rune r) return; } + switch(r) { + case 0x03: /* ^C: send interrupt */ + case 0x7F: /* DEL: send interrupt */ + t.qh = t.q0 = t.q1 = t.nr; + show(t.q0); +{int x; x=tcgetpgrp(rcfd); +print("postnote %d pgrp %d\n", rcpid, x); + postnote(PNGROUP, x, "interrupt"); +if(x >= 2) killpg(x, 2); +} + // write(rcfd, "\x7F", 1); + return; + } + if(rawon() && t.q0==t.nr){ addraw(&r, 1); consread(); @@ -898,12 +912,6 @@ key(Rune r) snarf(); switch(r) { - case 0x03: /* ^C: send interrupt */ - case 0x7F: /* DEL: send interrupt */ - t.qh = t.q0 = t.q1 = t.nr; - show(t.q0); - write(rcfd, "\x7F", 1); - break; case 0x06: /* ^F: file name completion */ case Kins: /* Insert: file name completion */ rp = namecomplete(); diff --git a/src/cmd/rio/menu.c b/src/cmd/rio/menu.c index 079e86d6..81ad960f 100644 --- a/src/cmd/rio/menu.c +++ b/src/cmd/rio/menu.c @@ -138,6 +138,9 @@ spawn(ScreenInfo *s) close(ConnectionNumber(dpy)); if (s->display[0] != '\0') putenv(s->display); + signal(SIGINT, SIG_DFL); + signal(SIGTERM, SIG_DFL); + signal(SIGHUP, SIG_DFL); if (termprog != NULL) { execl(shell, shell, "-c", termprog, 0); fprintf(stderr, "rio: exec %s", shell); |