2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-04-01 11:13:24 +00:00

fix: always start job in exec handler

makes sure that if any errors occur the job
will still throw the start hook
This commit is contained in:
TorchedSammy 2022-05-13 16:59:16 -04:00
parent 9a87d76969
commit 3374dfd28f
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD

View File

@ -362,12 +362,9 @@ func execHandle(bg bool) interp.ExecHandlerFunc {
if bg {
j = jobs.getLatest()
j.setHandle(cmd.Process)
j.start(cmd.Process.Pid)
}
if err == nil {
if bg {
j.start(cmd.Process.Pid)
}
if done := ctx.Done(); done != nil {
go func() {
<-done