[vlc-commits] cli: use vlc_dup2()
Rémi Denis-Courmont
git at videolan.org
Mon Nov 30 17:05:03 CET 2020
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Nov 29 11:48:02 2020 +0200| [a4ca0de9e087e6a6a3bb86c585cf29ad5c553576] | committer: Rémi Denis-Courmont
cli: use vlc_dup2()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a4ca0de9e087e6a6a3bb86c585cf29ad5c553576
---
modules/control/cli/cli.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/modules/control/cli/cli.c b/modules/control/cli/cli.c
index 9c93a26f9a..2fa1e7b90d 100644
--- a/modules/control/cli/cli.c
+++ b/modules/control/cli/cli.c
@@ -224,11 +224,7 @@ static int LogOut(struct cli_client *cl, const char *const *args, size_t count,
fflush(cl->stream);
if (fd2 != 1)
-#ifdef HAVE_DUP3
- dup3(fd, fd2, O_CLOEXEC);
-#else
- dup2(fd, fd2), fcntl(fd2, F_SETFD, FD_CLOEXEC);
-#endif
+ vlc_dup2(fd, fd2);
else
dup2(fd, fd2);
fseek(cl->stream, 0, SEEK_SET);
More information about the vlc-commits
mailing list