From: Howard Chu Date: Thu, 12 Jun 2025 14:16:00 +0000 (+0100) Subject: ITS#10355 lmdb mplay: don't assign to stdin/stdout X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14d6629bc8a9fe40d8a6bee1bf71c45afe7576b6;p=thirdparty%2Fopenldap.git ITS#10355 lmdb mplay: don't assign to stdin/stdout --- diff --git a/libraries/liblmdb/mplay.c b/libraries/liblmdb/mplay.c index 5ca66d9176..c6e981f009 100644 --- a/libraries/liblmdb/mplay.c +++ b/libraries/liblmdb/mplay.c @@ -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 {