On Tue, 17 Jun 2025, Corinna Vinschen wrote:

> Hi Jeremy,
>
> On May 30 16:18, Jeremy Drake via Cygwin-patches wrote:
> > On Thu, 29 May 2025, Jeremy Drake via Cygwin-patches wrote:
> > > +       /* TODO: FAE_(F)CHDIR */
> >
> > I am not seeing how the posix cwd is passed to a spawned child.  Windows
> > handles the cwd itself, but for cases where the cwd is virtual (say under
> > /proc) there must be a way to pass a cwd that Windows doesn't know
> > about...
>
> The cwd is part of the cygheap. Inheritance works by having different
> inheritance flags which specify how the data is propagated and copying
> data in the cygheap selectively.  The cwdstuff is part of the cygheap
> header which is always inherted by all children.  Does that help?

Yeah.  I think I figured that out, but it took a while to get over the
"this isn't fork, so the heap wouldn't be copied" factor. :)

Reply via email to