aboutsummaryrefslogtreecommitdiff
path: root/src/os/exec_unix.go
diff options
context:
space:
mode:
authorKir Kolyshkin <kolyshkin@gmail.com>2025-09-10 19:00:19 -0700
committerKirill Kolyshkin <kolyshkin@gmail.com>2025-09-15 11:58:58 -0700
commit3573227fe3fe8d141dbf06e257609a59871d5248 (patch)
tree36e9503ef0846a301170cf44ceef5d4003258115 /src/os/exec_unix.go
parent68c6a73380e82a0ea9a93c1a75ab8a38f28f3a3d (diff)
downloadgo-3573227fe3fe8d141dbf06e257609a59871d5248.tar.xz
os: add and use errProcessReleased
This error is already used in three places, so let's define it. Change-Id: I73565d94aebcf3d5a278201d96839d82db85a2d4 Reviewed-on: https://go-review.googlesource.com/c/go/+/702436 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Mark Freeman <markfreeman@google.com> Reviewed-by: Sean Liao <sean@liao.dev> Reviewed-by: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/os/exec_unix.go')
-rw-r--r--src/os/exec_unix.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/os/exec_unix.go b/src/os/exec_unix.go
index f9be8dc068..d2ceb0ceb5 100644
--- a/src/os/exec_unix.go
+++ b/src/os/exec_unix.go
@@ -92,7 +92,7 @@ func (p *Process) signal(sig Signal) error {
func (p *Process) pidSignal(s syscall.Signal) error {
if p.Pid == pidReleased {
- return errors.New("os: process already released")
+ return errProcessReleased
}
if p.Pid == pidUnset {
return errors.New("os: process not initialized")
@@ -105,7 +105,7 @@ func (p *Process) pidSignal(s syscall.Signal) error {
case statusDone:
return ErrProcessDone
case statusReleased:
- return errors.New("os: process already released")
+ return errProcessReleased
}
return convertESRCH(syscall.Kill(p.Pid, s))