Runtime extraction of bundled native agent binaries.
Extracts platform-specific agent binaries from JAR resources to temporary directory for loading. Handles concurrent extraction safely using file locking and registers shutdown hooks for cleanup.
The extraction process:
Thread-safe and safe for concurrent JVM processes.
Runtime extraction of bundled native agent binaries. Extracts platform-specific agent binaries from JAR resources to temporary directory for loading. Handles concurrent extraction safely using file locking and registers shutdown hooks for cleanup. The extraction process: 1. Detects current platform 2. Reads SHA256 hash from bundled .sha256 file 3. Checks if agent already extracted to temp directory 4. If not, locks and extracts atomically 5. Sets appropriate file permissions (executable on Unix) 6. Verifies file permissions 7. Registers cleanup hook on first extraction 8. Returns absolute path to extracted agent Thread-safe and safe for concurrent JVM processes.
(extract-agent)Extract bundled agent binary to temp directory.
Returns absolute path to extracted agent or nil if:
The extracted file is registered for cleanup on JVM shutdown.
Safe to call concurrently from multiple threads or processes.
Extract bundled agent binary to temp directory. Returns absolute path to extracted agent or nil if: - Platform is not supported - Hash file is not found in resources - Agent binary is not found in resources - Extraction fails The extracted file is registered for cleanup on JVM shutdown. Safe to call concurrently from multiple threads or processes.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |