]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#10355 lmdb mplay: don't assign to stdin/stdout mdb.master
authorHoward Chu <hyc@openldap.org>
Thu, 12 Jun 2025 14:16:00 +0000 (15:16 +0100)
committerHoward Chu <hyc@openldap.org>
Thu, 12 Jun 2025 14:16:00 +0000 (15:16 +0100)
libraries/liblmdb/mplay.c

index 5ca66d9176104dca08a4cb78a15b774f59711146..c6e981f0093721c4e832934b6aa83638418221e4 100644 (file)
@@ -481,12 +481,10 @@ static pidpair *addpid(int tpid)
        pipe(fdin);
        if ((pid = fork()) == 0) {
                /* child */
-               fclose(stdin);
-               fclose(stdout);
+               fflush(stdin);
+               fflush(stdout);
                dup2(fdout[0], 0);
                dup2(fdin[1], 1);
-               stdin = fdopen(0, "r");
-               stdout = fdopen(1, "w");
                child();
                return 0;       /* NOTREACHED */
        } else {