system.get_ld_library_directories

Synopsis

local system = require "system"
system.get_ld_library_directories() -> file_descriptor[]

Description

Obtains and returns a list of file descriptors using the following method:

  1. Query RTLD_DI_SERINFO for the executable, ignoring repeated paths.

  2. Open the directories for the query’s results, ignoring any that fails.

  3. If the calling process was spawned from Emilua using spawn_vm(), also acquire duplicates from the file descriptors sent through the parameter subprocess.ld_library_directories.

Future directions

New parameters might be added in the future to control the value returned by this function.