Skip to content

api-modernization: replace usleep() with nanosleep()-based wrapper #489

@somethingwithproof

Description

@somethingwithproof

Summary

Replace usleep() calls with nanosleep() (or wrapper) for modern POSIX compatibility.

Work

  • Introduce a small sleep helper wrapper in a shared location.
  • Migrate call sites in ping.c, spine.c, sql.c, php.c, poller.c, and nft_popen.c.
  • Handle EINTR robustly where needed.

Acceptance Criteria

  • No direct usleep() in top-level runtime sources.
  • Sleep semantics remain equivalent at current intervals.
  • Interrupted sleeps are handled safely and consistently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions