]> granicus.if.org Git - nethack/commitdiff
Wait for the message handler process to finish
authorPasi Kallinen <paxed@alt.org>
Sat, 27 Aug 2016 17:13:17 +0000 (20:13 +0300)
committerPasi Kallinen <paxed@alt.org>
Sat, 27 Aug 2016 17:13:17 +0000 (20:13 +0300)
src/pline.c

index 827b34793075dc70d03f55f9ae9d495cdcdfa59c..c539218b60b4e0f1857ee1aa242689c9c1eaea97 100644 (file)
@@ -655,6 +655,9 @@ const char *line;
         (void) fprintf(stderr, "Exec to message handler %s failed.\n",
                        env);
         terminate(EXIT_FAILURE);
+    } else if (f > 0) {
+        int status;
+        waitpid(f, &status, 0);
     } else if (f == -1) {
         perror((char *) 0);
         use_pline_handler = FALSE;