]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#10355 lmdb mplay: don't assign to stdin/stdout
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:50 +0000 (15:16 +0100)
libraries/liblmdb/mplay.c

index 0fef74f67e40ff0ab389ff3940c0de501bc82d2a..4673036774ff3a244f985f0b88b6474cf90bae5b 100644 (file)
@@ -483,12 +483,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 {