diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-02-15 14:40:19 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-02-15 14:40:19 +0900 |
| commit | 3054527ca579c9063840c0eff1e6160d791254fe (patch) | |
| tree | 407cbdabf6a56bb9d8901c9a456ab83fd929603a /main.go | |
| parent | ddb2f9c11bcfabfef5f8f6d91eb19f6287ba1c92 (diff) | |
fortify: prevent exit status 0 on app failure
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -328,14 +328,14 @@ func runApp(config *fst.Config) { } else { logWaitError(err) } + + if rs.ExitCode == 0 { + rs.ExitCode = 126 + } } if rs.WaitErr != nil { fmsg.Println("inner wait failed:", rs.WaitErr) } - if rs.ExitCode < 0 { - fmsg.VPrintf("got negative exit %v", rs.ExitCode) - fmsg.Exit(1) - } fmsg.Exit(rs.ExitCode) panic("unreachable") } |
