Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
135a548f
Commit
135a548f
authored
Nov 16, 2024
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X wcfs: Do not fail if to-be-killed process exited by itself and was waited by its parent
parent
cd6d0b71
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
wcfs/misc.go
wcfs/misc.go
+7
-0
No files found.
wcfs/misc.go
View file @
135a548f
...
...
@@ -586,10 +586,17 @@ func isProcessAlive(proc *os.Process) (_ bool, err error) {
// pid exists. Check if proc is not zombie
gproc
,
err
:=
process
.
NewProcess
(
int32
(
proc
.
Pid
))
if
err
!=
nil
{
// XXX can fail even if ^^^ signal was ok (race)
return
false
,
err
}
statusv
,
err
:=
gproc
.
Status
()
if
err
!=
nil
{
// XXX isAlive pid804199: open /proc/804199/status: no such file or directory
// ref:Zzj45iDT1E4PakvG@deca.navytux.spb.ru
var
e
syscall
.
Errno
if
errors
.
As
(
err
,
&
e
)
&&
e
==
syscall
.
ENOENT
{
err
=
nil
}
return
false
,
err
}
for
_
,
status
:=
range
statusv
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment