Skip to content

Commit

Permalink
Only trigger instrumnetation after cleaning up FDs
Browse files Browse the repository at this point in the history
  • Loading branch information
byroot committed Feb 1, 2024
1 parent f13dcb3 commit 7c99f37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/bootsnap/bootsnap.c
Original file line number Diff line number Diff line change
Expand Up @@ -922,9 +922,9 @@ bs_fetch(char * path, VALUE path_v, char * cache_path, VALUE handler, VALUE args
goto succeed; /* output_data is now the correct return. */

#define CLEANUP \
if (status != Qfalse) bs_instrumentation(status, path_v); \
if (current_fd >= 0) close(current_fd); \
if (cache_fd >= 0) close(cache_fd);
if (cache_fd >= 0) close(cache_fd); \
if (status != Qfalse) bs_instrumentation(status, path_v);

succeed:
CLEANUP;
Expand Down

0 comments on commit 7c99f37

Please sign in to comment.