You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docker run --rm -v $PWD:/app -w /app golang:latest go run exec_cancelation_bug.go for https://play.golang.org/p/BtLj2ztnCF, result: Error: "signal: killed", time: 5.005615527s
msoap
changed the title
exec.CommandContext with timeout with multiple subprocesses isn't canceled
os/exec: CommandContext with timeout with multiple subprocesses isn't canceled
Oct 29, 2017
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
I'm run the
exec.CommandContext
with 1 second timeout with a shell command that is delayed 5 seconds.What did you expect to see?
The command must be canceled after 1 second.
What did you see instead?
Command is delayed 5 seconds.
I assume that this is due to the number of processes that are started.
That's few examples (for
go version go1.9.2 darwin/amd64
):sh
and onlysleep
, https://play.golang.org/p/g-Nm3XDhu7, result:Error: "signal: killed", time: 1.001670305s
sh
andsleep
andecho
, https://play.golang.org/p/BtLj2ztnCF, result:Error: "signal: killed", time: 5.015074382s
bash
and onlysleep
, https://play.golang.org/p/L41fxmEkA9, result:Error: "signal: killed", time: 1.001631559s
bash
andsleep
andecho
, https://play.golang.org/p/EUYBO2tYM6, result:Error: "signal: killed", time: 5.01418195s
For
go version go1.9.2 linux/amd64
:docker run --rm -v $PWD:/app -w /app golang:latest go run exec_cancelation_bug.go
for https://play.golang.org/p/BtLj2ztnCF, result:Error: "signal: killed", time: 5.005615527s
Error: "signal: killed", time: 5.006439868s
Error: "signal: killed", time: 1.001275981s
The text was updated successfully, but these errors were encountered: