Commit a969a60
authored
fix pidexists to use procfs (#43754)
### What does this PR do?
Fixes `os.PidExists` to handle PID namespaces.
### Motivation
There is no guarantee an agent container is in the same PID namespace as the host, so we need to use `procfs` to determine PID aliveness.
### Describe how you validated your changes
Existing tests.
### Additional Notes
Co-authored-by: bryce.kahle <bryce.kahle@datadoghq.com>1 parent 9ac90bd commit a969a60
2 files changed
+7
-12
lines changedLines changed: 7 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | 6 | | |
9 | 7 | | |
10 | 8 | | |
11 | 9 | | |
12 | | - | |
13 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 18 | + | |
| 19 | + | |
22 | 20 | | |
23 | 21 | | |
24 | | - | |
25 | | - | |
| 22 | + | |
26 | 23 | | |
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | 6 | | |
9 | 7 | | |
10 | 8 | | |
| |||
0 commit comments