Re: Issue with fcntl FD_CLOEXEC and execve
Florian Weimer <[email protected]> Sun, 21 Jun 2020 21:57:18 +0200
| Newsgroups | org.kernel.vger.linux-c-programming |
|---|---|
| Message-ID | <[email protected]> |
* Yuri Edward:
> https://github.com/BlockProject3D/Framework/blob/ProcessManagement/Base/src/Framework/System/Process.cpp
> > This is the main class that performs fork, pipe, read, write and
if (fcntl(commonfd[PIPE_WRITE], FD_CLOEXEC, 1) != 0)
That's not how fcntl works. You need to use F_GETFD and F_SETFD to
set the FD_CLOEXEC flag.