[fpc-pascal] Problem with file descriptors when doing fork on linux

Ko Paka kopaka4 at gmail.com
Fri Feb 2 10:50:42 CET 2018


I would like to ask advice. My colleague run into a problem, when he had
used TProcess to spawn other process. Because of fork nature, file
descriptors was copied into newly created process.
He found that for such cases CLOEXEC flag exists to be used when open file.
I found flag declared in various units inside fpc, but nowhere to be used.
So when I need to use it I need to make some own routine?
Or more generally do exists in fpc some other way how to deal with this
problem - to create new process but without copied file descriptors?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20180202/9fbdfe9f/attachment.html>

More information about the fpc-pascal mailing list