Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 92ee52cc authored by Josh Gao's avatar Josh Gao
Browse files

base: don't overwrite errno in unique_fd::~unique_fd.

unique_fd's destructor potentially mangling errno makes it difficult to
use correctly in code that sets errno (or, in reality, it makes it so
that errno values get randomly stomped upon if close actually sets
errno, because no one accounts for this case).

Preserve errno ourselves to avoid this.

Test: treehugger
Change-Id: Ib06e6f65866d86fff4032b2311021eaf9226a1af
parent 2dc8b4ce
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment