File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -258,7 +258,7 @@ func runCmdContext(ctx context.Context, cmd *exec.Cmd) error {
258
258
case err := <- resChan :
259
259
return err
260
260
case <- time .After (1 * time .Minute ):
261
- HandleHangingGoCommand ()
261
+ HandleHangingGoCommand (cmd . Process )
262
262
case <- ctx .Done ():
263
263
}
264
264
} else {
@@ -291,13 +291,13 @@ func runCmdContext(ctx context.Context, cmd *exec.Cmd) error {
291
291
case err := <- resChan :
292
292
return err
293
293
case <- time .After (10 * time .Second ): // a shorter wait as resChan should return quickly following Kill
294
- HandleHangingGoCommand ()
294
+ HandleHangingGoCommand (cmd . Process )
295
295
}
296
296
}
297
297
return <- resChan
298
298
}
299
299
300
- func HandleHangingGoCommand () {
300
+ func HandleHangingGoCommand (proc * os. Process ) {
301
301
switch runtime .GOOS {
302
302
case "linux" , "darwin" , "freebsd" , "netbsd" :
303
303
fmt .Fprintln (os .Stderr , `DETECTED A HANGING GO COMMAND
@@ -330,7 +330,7 @@ See golang/go#54461 for more details.`)
330
330
panic (fmt .Sprintf ("running %s: %v" , listFiles , err ))
331
331
}
332
332
}
333
- panic ("detected hanging go command: see golang/go#54461 for more details" )
333
+ panic (fmt . Sprintf ( "detected hanging go command (pid %d) : see golang/go#54461 for more details" , proc . Pid ) )
334
334
}
335
335
336
336
func cmdDebugStr (cmd * exec.Cmd ) string {
You can’t perform that action at this time.
0 commit comments