Skip to content

Commit 326dcc2

Browse files
committed
fix: fix errno preservation in native socket hook
1 parent 36f3db5 commit 326dcc2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

ddprof-lib/src/main/cpp/nativeSocketInterposer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ static inline ssize_t runStreamSocketHook(int fd, Fn fn, u8 op, Call call) {
7676
}
7777
u64 t1 = TSC::ticks();
7878
if (NativeSocketSampler::active()) {
79+
ErrnoGuard errno_guard;
7980
return NativeSocketSampler::recordHookResult(fd, ret, t0, t1, op);
8081
}
8182
return ret;

0 commit comments

Comments
 (0)