win fixes
- don't exit from a "child" note unless rc exited (code copied from 9term.c) - ignore writes to the tag; specifically " Send Noscroll" at startup. R=rsc CC=codebot http://codereview.appspot.com/181115
This commit is contained in:
parent
7d9c0f0f0e
commit
6a6c2663bf
1 changed files with 26 additions and 6 deletions
|
|
@ -108,9 +108,17 @@ hangupnote(void *a, char *msg)
|
||||||
noted(NDFLT);
|
noted(NDFLT);
|
||||||
}
|
}
|
||||||
if(strstr(msg, "child")){
|
if(strstr(msg, "child")){
|
||||||
/* bug: do better */
|
char buf[128];
|
||||||
|
int n;
|
||||||
|
|
||||||
|
n = awaitnohang(buf, sizeof buf-1);
|
||||||
|
if(n > 0){
|
||||||
|
buf[n] = 0;
|
||||||
|
if(atoi(buf) == pid)
|
||||||
threadexitsall(0);
|
threadexitsall(0);
|
||||||
}
|
}
|
||||||
|
noted(NCONT);
|
||||||
|
}
|
||||||
noted(NDFLT);
|
noted(NDFLT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -357,12 +365,24 @@ stdinproc(void *v)
|
||||||
print("unknown message %c%c\n", e.c1, e.c2);
|
print("unknown message %c%c\n", e.c1, e.c2);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'E': /* write to body; can't affect us */
|
case 'E': /* write to body or tag; can't affect us */
|
||||||
|
switch(e.c2){
|
||||||
|
case 'I':
|
||||||
|
case 'D': /* body */
|
||||||
if(debug)
|
if(debug)
|
||||||
fprint(2, "shift typing %d... ", e.q1-e.q0);
|
fprint(2, "shift typing %d... ", e.q1-e.q0);
|
||||||
q.p += e.q1-e.q0;
|
q.p += e.q1-e.q0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'i':
|
||||||
|
case 'd': /* tag */
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
goto Unknown;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case 'F': /* generated by our actions; ignore */
|
case 'F': /* generated by our actions; ignore */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue