os: Process.Exited returns false after exiting on signal #19798
Labels
FrozenDueToAge
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.7.5 linux/amd64
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/bombela/u/go"
GORACE=""
GOROOT="/home/bombela/u/go/go1.7.5"
GOTOOLDIR="/home/bombela/u/go/go1.7.5/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build016673509=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
What did you do?
What did you expect to see?
What did you see instead?
It looks like
Exited()
returns true only if the process exited viaexit()
, not when it exited viasignal
. It could be thatExited()
should returntrue
on signal.Casting to
syscall.WaitStatus
allows to check for bothExited()
andSignaled()
, making it possible to know if the process is running or not. It seems to be impossible to know if the process is still running via theCommand
abstraction.Naive suggestion: maybe a
IsRunning()
should be provided onCommand
.The text was updated successfully, but these errors were encountered: