Skip to content

Commit

Permalink
woops
Browse files Browse the repository at this point in the history
  • Loading branch information
TingDaoK committed Jan 22, 2025
1 parent 427d6c8 commit 398b4e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions include/aws/common/private/thread_shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,9 @@ AWS_COMMON_API void aws_thread_initialize_thread_management(void);
*/
AWS_COMMON_API size_t aws_thread_get_managed_thread_count(void);

/**
* The handler after fork in the child process.
*/
void aws_pthread_atfork_on_fork_child(void);

#endif /* AWS_COMMON_PRIVATE_THREAD_SHARED_H */
2 changes: 1 addition & 1 deletion source/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ void aws_common_library_init(struct aws_allocator *allocator) {
} else {
AWS_LOGF_INFO(AWS_LS_COMMON_GENERAL, "static: libnuma.so failed to load");
}
if (pthread_atfork(common_pthread_atfork_on_fork, NULL, NULL) != 0) {
if (pthread_atfork(NULL, NULL, aws_pthread_atfork_on_fork_child) != 0) {
AWS_LOGF_INFO(AWS_LS_COMMON_GENERAL, "static: failed to register pthread at fork");
}
#endif
Expand Down

0 comments on commit 398b4e9

Please sign in to comment.