serpent-os / boulder-d-legacy

Replaced by Rust tooling
https://serpentos.com
21 stars 7 forks source link

boulder/controller: Return ExitStatus from StageResult #60

Closed joebonrichie closed 1 year ago

joebonrichie commented 1 year ago

Previously controller.build() would not return a result meaning that boulder build would always exit with code 0, even if the build failed.

Now, the build subcommand will exit with the code returned by controller.build.

Resolves #34.

joebonrichie commented 1 year ago

I'm wondering if it maybe be better for the stages to return the exact exitCode as well as StageReturn.{Failure,Success} so boulder can return with the exit code propagated from spawnProcess e.g. 130 for SIGINT. This is related to the SIGINT catching PR as well.

I'd rather get this in first then work on that, feedback wanted.

ermo commented 1 year ago

I agree.

I'm wondering if there are C headers with symbolic includes containing error constants that we could map to enums/bitfields?

ermo commented 1 year ago

LGTM!, thanks!