]> git.lizzy.rs Git - plan9front.git/commitdiff
nedmail: don't try to shoot down subcommand on interrupt
authorcinap_lenrek <cinap_lenrek@felloff.net>
Sun, 5 Jul 2020 16:17:20 +0000 (18:17 +0200)
committercinap_lenrek <cinap_lenrek@felloff.net>
Sun, 5 Jul 2020 16:17:20 +0000 (18:17 +0200)
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.

sys/src/cmd/upas/ned/nedmail.c

index 81ebcd271e972d54eaf62187bc4471b671d20e38..802231759437c0d6e5fdbd40592e1befecdc7bc3 100644 (file)
@@ -2593,9 +2593,7 @@ fqcmd(Cmd*, Message *m)
 void
 system(char *cmd, char **av, int in)
 {
-       int pid;
-
-       switch(pid=fork()){
+       switch(fork()){
        case -1:
                return;
        case 0:
@@ -2615,7 +2613,7 @@ system(char *cmd, char **av, int in)
                while(waitpid() < 0){
                        if(!interrupted)
                                break;
-                       postnote(PNPROC, pid, "die");
+                       interrupted = 0;
                        continue;
                }
                break;