Envoy: improve syscall API wrappers

Created on 9 Jul 2018  路  5Comments  路  Source: envoyproxy/envoy

Per discussion in #3813 it'd be good if the doRead call didn't latch errno several levels away from where the actual syscall was performed. We should change the APIs to return {rc, errnno} in some form to better futureproof in case the intermediate function calls add their own errno-corrupting debug logging.

We could also get really fancy and insist that errno is latched via fix_format fixes, as also discussed there.

beginner help wanted tech debt

Most helpful comment

@venilnoronha go for it!

All 5 comments

Hi @alyssawilk, I'd like to give it a try.

@venilnoronha go for it!

Erm, looking at the already merged and outstanding PRs, the errno seems to be latched one level too high (inside functions calling syscall wrappers and not in the syscall wrappers themselves).

Is there any reason not to do it in the syscall wrappers and return tuple from them?

@PiotrSikora that's next in the plan of action. Briefly, I wanted to start off one level higher to keep the PRs smaller.

I think the final fix was solid, and we forgot to close this one out. Thanks!

Was this page helpful?
0 / 5 - 0 ratings