Skip to content

Version 1.0.0

Choose a tag to compare

@StormBytePP StormBytePP released this 04 Sep 23:08
· 50 commits to master since this release

[Summary]

StormByte System is the C++26 process and environment layer of the StormByte suite.

Spawn children with piped stdin/stdout/stderr, chain them, suspend/resume, and expand environment strings. POSIX and Windows stay behind one API.

Initial public release of StormByte-System.

Added

  • Process: run external programs with piped stdin / stdout / stderr
    • Move-only ownership; starts on construction
    • Wait() for exit code (blocking, no timeout)
    • Suspend() / Resume()
    • Stream operators: write stdin, read stdout, << System::EoF to close stdin
    • Process chaining (p1 >> p2) via background forwarder
    • Stderr() to read the stderr pipe
    • Cross-platform (POSIX fork/exec and Windows CreateProcessW)
  • Pipe (internal): anonymous pipes for IPC (UNIX pipe/pipe2, Windows CreatePipe)
    • Atomic chunked writes, bind/dup helpers, handle inheritance flags on Windows
  • Variable: expand environment strings (Windows ExpandEnvironmentStrings; UNIX ~ → home)
  • Exceptions: Exception, FileIOError, ExecutableNotFound
  • Unit tests for Linux, macOS and Windows (pipelines, stdin, exit codes, move)

Fixed

  • Process move no longer double-waits the same child (ownership is fully transferred)
  • Failed execvp in the child uses _exit(127) instead of throwing across fork
  • Removed unimplemented Pipe::BindRead(Pipe&) / BindWrite(Pipe&) declarations
  • Pipes owned with std::unique_ptr instead of raw new/delete
  • SIGPIPE ignored once per process (not on every Pipe construction)
  • WriteAtomic treats empty input as success
  • Windows command line built without a trailing space

Notes

  • On UNIX, if the executable cannot be started, the child exits with status 127; the parent does not throw from the child path.
  • Wait() has no timeout; it blocks until the process ends.