Use named error return for initProcess#start#2238
Use named error return for initProcess#start#2238AkihiroSuda merged 1 commit intoopencontainers:masterfrom
Conversation
7b64d10 to
a230cbd
Compare
|
/cc @mrunalp |
|
The deferred func starting line 352 is duplicate with the one starting line 304. I think the second deferred func can be removed. |
|
What happens is that the second deferred func is ineffective. I will drop the second deferred func. |
a230cbd to
b56cc49
Compare
|
@tedyu thanks for the patch! Coincidentally, I was looking into this part of code as well and ended up with a similar patch. Some discussion about the code is provided at #1916 (review) (also, this is a PR to blame) and yet it doesn't explain the double defer. I think the defer needs to be moved up a bit (before @crosbymichael @giuseppe PTAL |
|
@AkihiroSuda ptal |
|
@kolyshkin |
|
@kolyshkin |
|
@crosbymichael ptal 🤗 |
|
@crosbymichael @thaJeztah Thanks |
|
I'm not a maintainer in this repository; @AkihiroSuda @mrunalp PTAL? |
Signed-off-by: zyu <[email protected]>
|
@mrunalp thanks |
|
Thanks @AkihiroSuda |
Please use your full name next time |
In initProcess#start, there is deferred func :
Since the error return is not named, the above check doesn't cover all the cases.
e.g. a few lines below:
The check in deferred func doesn't check either err or, the actual returned error.
This PR changes the error return to be named.