On 04/02/2026 23:50, Dan Shelton via Cygwin wrote:
On Wed, 4 Feb 2026 at 22:37, Brian Inglis via Cygwin <[email protected]> wrote:
On 2026-02-04 14:17, Dan Shelton via Cygwin wrote:
Why does Cygwin always use absolute paths instead of
OBJECT_ATTRIBUTES.RootDirectory in NtOpenFile(),
NtSetInformationFile() for rename and hardlinks

This slows down Cygwin path lookups a lot, and with lots of path
elements each lookup with a relative RootDirectory might be a lot
faster, e.g. for openat(), linkat(), renameat().
Because volunteers' spare time is limited, and performance is good enough for
those who might do the work:
Please do not slap me. That hurt.

My question is about whether there are any technical issues which
prevent OBJECT_ATTRIBUTES.RootDirectory from being used in Cygwin for
openat().

2nd question: Is OBJECT_ATTRIBUTES.RootDirectory really a root, and
you cannot do cd ..?

Take a look at the openat(3P) function, it seems to be what you are looking for.

Enjoy

Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S.  https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded


--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to