Robust pid locking for shim processes#3366
Conversation
|
Build succeeded.
|
5d4f97c to
4d28a19
Compare
|
Build succeeded.
|
|
@jterry75 updated |
Closes containerd#2832 Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
|
Build succeeded.
|
Codecov Report
@@ Coverage Diff @@
## master #3366 +/- ##
==========================================
- Coverage 45.08% 40.28% -4.81%
==========================================
Files 113 76 -37
Lines 12542 10484 -2058
==========================================
- Hits 5654 4223 -1431
+ Misses 6032 5676 -356
+ Partials 856 585 -271
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #3366 +/- ##
==========================================
- Coverage 45.08% 40.28% -4.81%
==========================================
Files 113 76 -37
Lines 12542 10484 -2058
==========================================
- Hits 5654 4223 -1431
+ Misses 6032 5676 -356
+ Partials 856 585 -271
Continue to review full report at Codecov.
|
cpuguy83
left a comment
There was a problem hiding this comment.
Just some questions on why we need to lock for create/start functions.
| pio *processIO | ||
| pidFile = newPidFile(p.Bundle) | ||
| ) | ||
| p.pid.Lock() |
There was a problem hiding this comment.
Curious about this lock.
If the pid is 0, can the rest of the code check that instead of holding a lock during this whole function?
There was a problem hiding this comment.
this is the create function so its safe to hold the lock until it's done
| p := s.p | ||
| sio := p.stdio | ||
|
|
||
| p.pid.Lock() |
There was a problem hiding this comment.
Same question as for Init above.
|
LGTM |
Closes #2832
Signed-off-by: Michael Crosby crosbymichael@gmail.com