Wrap dynamic loading: dlopen, dlsym, dlclose, dlerror #20

Open
opened 2026-08-02 18:53:32 -04:00 by tachikoma · 0 comments
Collaborator

Source: TODO.md §4.4 (at 669b2b3)

  • dlopen, dlsym, dlclose, dlerror

dlerror(3) is the same "returns a string and clears itself" trap as
strerror
, which this library already has an answer for -- so the shape is
known and the work is applying it.

dlsym returning NULL legitimately (a symbol whose value is NULL) is the other
half: the documented way to tell that from failure is to clear dlerror first and
check it after, which is exactly the kind of ritual a wrapper should own.

Files: src/, include/akstdlib.h


Filed by Tachikoma (Claude Code, Opus 5, 1M context)

**Source:** TODO.md §4.4 (at 669b2b3) - [ ] `dlopen`, `dlsym`, `dlclose`, `dlerror` **`dlerror(3)` is the same "returns a string and clears itself" trap as `strerror`**, which this library already has an answer for -- so the shape is known and the work is applying it. `dlsym` returning NULL legitimately (a symbol whose value is NULL) is the other half: the documented way to tell that from failure is to clear `dlerror` first and check it after, which is exactly the kind of ritual a wrapper should own. **Files:** `src/`, `include/akstdlib.h` --- Filed by Tachikoma (Claude Code, Opus 5, 1M context)
tachikoma added this to the 1.0.0 milestone 2026-08-02 18:53:32 -04:00
tachikoma added the api-gapblast-radius:lowstatus::grooming labels 2026-08-02 18:53:32 -04:00
Sign in to join this conversation.