shithub: riscv

Download patch

ref: e844c77845e489a1e6421b570e221e9672106bbc
parent: 43e56e26ded432658cdc5b9b3fce16919b3c64f7
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Jul 5 14:17:20 EDT 2020

nedmail: don't try to shoot down subcommand on interrupt

this breaks interrupt key handling in rio. theres also no
point in trying todo so as rio sends the note to the whole
process group so the subcommand should have got the note
already.

just wait for the subprocess to terminate.

--- a/sys/src/cmd/upas/ned/nedmail.c
+++ b/sys/src/cmd/upas/ned/nedmail.c
@@ -2593,9 +2593,7 @@
 void
 system(char *cmd, char **av, int in)
 {
-	int pid;
-
-	switch(pid=fork()){
+	switch(fork()){
 	case -1:
 		return;
 	case 0:
@@ -2615,7 +2613,7 @@
 		while(waitpid() < 0){
 			if(!interrupted)
 				break;
-			postnote(PNPROC, pid, "die");
+			interrupted = 0;
 			continue;
 		}
 		break;