mirror of https://github.com/Hilbis/Hilbish
fix: always start job in exec handler
makes sure that if any errors occur the job will still throw the start hookextended-job-api
parent
9a87d76969
commit
3374dfd28f
5
exec.go
5
exec.go
|
@ -362,12 +362,9 @@ func execHandle(bg bool) interp.ExecHandlerFunc {
|
||||||
if bg {
|
if bg {
|
||||||
j = jobs.getLatest()
|
j = jobs.getLatest()
|
||||||
j.setHandle(cmd.Process)
|
j.setHandle(cmd.Process)
|
||||||
|
j.start(cmd.Process.Pid)
|
||||||
}
|
}
|
||||||
if err == nil {
|
if err == nil {
|
||||||
if bg {
|
|
||||||
j.start(cmd.Process.Pid)
|
|
||||||
}
|
|
||||||
|
|
||||||
if done := ctx.Done(); done != nil {
|
if done := ctx.Done(); done != nil {
|
||||||
go func() {
|
go func() {
|
||||||
<-done
|
<-done
|
||||||
|
|
Loading…
Reference in New Issue