subsystem-summary-of-process

Installation
SKILL.md

Process Subsystem — Technical Summary

Overview

The process subsystem provides asynchronous subprocess management for stellar-core, wrapping platform-specific process spawning (POSIX posix_spawnp and Windows CreateProcess) behind a unified asio-integrated interface. It enables running external commands (e.g., history archival tools like gzip, gunzip, curl) asynchronously, with configurable concurrency limits, output file capture, graceful shutdown, and process lifecycle tracking. No facilities exist for reading/writing subprocess I/O ports — this is strictly for "run a command, wait to see if it worked."

Key Files

  • ProcessManager.h — Abstract interface ProcessManager and the ProcessExitEvent class for async process completion notification.
  • ProcessManagerImpl.h / ProcessManagerImpl.cpp — Concrete implementation of ProcessManager; contains all lifecycle management, platform-specific spawning, signal handling, and shutdown logic.
  • PosixSpawnFileActions.h / PosixSpawnFileActions.cpp — POSIX-only RAII wrapper around posix_spawn_file_actions_t for redirecting subprocess stdout to a file.

Key Classes and Data Structures

ProcessManager (abstract, inherits std::enable_shared_from_this<ProcessManager>, NonMovableOrCopyable)

The public interface for subprocess management. One ProcessManager exists per Application instance, created via the static factory ProcessManager::create(Application&).

Related skills
Installs
1
GitHub Stars
3.3K
First Seen
14 days ago