Date: Wed, 03 Nov 2021 10:46:25 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 259625] fexecve interacts incorrectly with interpreters Message-ID: <bug-259625-227-K0a2SWKgZf@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-259625-227@https.bugs.freebsd.org/bugzilla/> References: <bug-259625-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D259625 --- Comment #4 from Drew DeVault <sir@cmpwn.com> --- This also fails: #include <assert.h> #include <fcntl.h> #include <limits.h> #include <stdio.h> #include <unistd.h> int main(void) { int fd =3D open("./test.sh", O_EXEC | O_RDONLY); char buf[PATH_MAX]; sprintf(buf, "/dev/fd/%d", fd); int fd2 =3D open(buf, O_RDONLY | O_CLOEXEC); assert(fd2 >=3D 0); } So perhaps this is not related to fexecve. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-259625-227-K0a2SWKgZf>