This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug stdio/22834] Subprocess forked by popen may crash in Linux when multithreads call popen
- From: "huanjiajia1983 at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 12 Feb 2018 01:53:47 +0000
- Subject: [Bug stdio/22834] Subprocess forked by popen may crash in Linux when multithreads call popen
- Auto-submitted: auto-generated
- References: <bug-22834-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=22834
--- Comment #3 from huanjiajia <huanjiajia1983 at gmail dot com> ---
(In reply to Florian Weimer from comment #2)
> So the strangeness here is that the O_CLOEXEC is optional in the parent
> process. The implementation assumes that other popen descriptors always
> closed by popen in its subprocess, but for execve, the closing is optional.
>
> I'm not sure what POSIX intends here.
I think you are right. The list proc_file_chain only handle the fds of pipes
created by popen, and these fds have been carefully handled by popen if
O_CLOEXEC has been defined. But it is tricky that the define of O_CLOEXEC
depends on parent process. :(
--
You are receiving this mail because:
You are on the CC list for the bug.