From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 31794 invoked from network); 15 Aug 2022 17:51:16 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 15 Aug 2022 17:51:16 -0000 Received: (qmail 20382 invoked by uid 550); 15 Aug 2022 17:51:11 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 20344 invoked from network); 15 Aug 2022 17:51:11 -0000 X-Virus-Scanned: SPAM Filter at disroot.org From: =?UTF-8?q?=C3=89rico=20Nogueira?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1660585856; bh=fvri4U+pLT17uUU6ntClabqAIQ0BLodMdrA9pO5mz0k=; h=From:To:Cc:Subject:Date; b=GDjnEm1iJOHFsKym0hCfvOZUtt85C+EVgD6kuKMAi/C+9nomGLxvh1NMPa9fIast4 JmLPEQFcF2fI9HQDxqWsEON8mK0F6iz9uZutPzYqVq5p5LcViGOXOJcRjcw04cfCJD gXo07vI3Xib+Av1zC/YFKMiaUIDwLb+iB1nSuZLuXR340fNlJTzHSYQ257KYfoUk2e m2i6Cxni0ZZV0gIwutYlqmVyIcUA+JLE/UmQtRzBmBC6LVKwTS6Gl1LUw29CvVbOgy DqoB2gtnaN6yNi70qMmVyfsXwG/9fF+DI2+PbNIOvwr45bMuxBJaSeHnN/rgPI5WsT e7MkavWWZZ2lg== To: musl@lists.openwall.com Cc: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Mon, 15 Aug 2022 14:50:21 -0300 Message-Id: <20220815175021.16659-1-ericonr@disroot.org> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [musl] [PATCH] remove extraneous syscall from fopen(3) the __fdopen() call afterwards will set the close-on-exec flag with the same syscall if "e" was specified in mode --- src/stdio/fopen.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/stdio/fopen.c b/src/stdio/fopen.c index e1b91e12..22b72edf 100644 --- a/src/stdio/fopen.c +++ b/src/stdio/fopen.c @@ -20,8 +20,6 @@ FILE *fopen(const char *restrict filename, const char *restrict mode) fd = sys_open(filename, flags, 0666); if (fd < 0) return 0; - if (flags & O_CLOEXEC) - __syscall(SYS_fcntl, fd, F_SETFD, FD_CLOEXEC); f = __fdopen(fd, mode); if (f) return f; -- 2.37.2