fortify: prevent exit status 0 on app failure
Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
ddb2f9c11b
commit
3054527ca5
8
main.go
8
main.go
@ -328,14 +328,14 @@ func runApp(config *fst.Config) {
|
|||||||
} else {
|
} else {
|
||||||
logWaitError(err)
|
logWaitError(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if rs.ExitCode == 0 {
|
||||||
|
rs.ExitCode = 126
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if rs.WaitErr != nil {
|
if rs.WaitErr != nil {
|
||||||
fmsg.Println("inner wait failed:", rs.WaitErr)
|
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)
|
fmsg.Exit(rs.ExitCode)
|
||||||
panic("unreachable")
|
panic("unreachable")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user