nexec
Java 21 · LinuxA process execution library for the failure modes ProcessBuilder leaves to you. An alternative to zt-exec.
- Outcomes you have to handle
- Every run ends in a sealed
ProcessOutcome, so a timeout or a crash is a type the compiler makes you deal with. - Pipes drained for you
- stdout and stderr are read on virtual threads while the process runs, so a chatty child can’t deadlock its parent.
- No orphaned grandchildren
- Stopping a process reaps the whole process tree it started, not just the PID you were handed.
- Output before the verdict
- Output is fully drained before an outcome resolves, so you never get an exit code with half the logs missing.