Add mkdirat utils and runas wrappers
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 17 Apr 2019 20:55:27 +0000 (16:55 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 18 Apr 2019 21:26:28 +0000 (17:26 -0400)
The lttng_directory_handle allows its user to keep a handle to
a directory and to create subdirectories relative to it.

On platforms implementing POSIX.2008, a directory file descriptor
is used to maintain a handle to an existing directory and used
in conjunction with mkdirat() to create subdirectories.

Derelict platforms (such as Solaris 10) use an alternative
implementation which carries the location of the root directory
and builds subdirectory paths on creation.

The existing mkdir utils are re-implemented using this new
interface (using the special AT_FDCWD file descriptor value, when
applicable) to limit code duplication.

The implementation of the directory handle and its users is
automatically selected based on the presence of the dirfd() function,
but can also be explicitly chosen using the --enable/disable-dirfd
configuration option.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>

No differences found
This page took 0.026747 seconds and 5 git commands to generate.