Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions src/threadpool.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,14 +261,6 @@ static void reset_once(void) {


static void init_once(void) {
#ifndef _WIN32
/* Re-initialize the threadpool after fork.
* Note that this discards the global mutex and condition as well
* as the work queue.
*/
if (pthread_atfork(NULL, NULL, &reset_once))
abort();
#endif
init_threads();
}

Expand Down
11 changes: 11 additions & 0 deletions src/unix/linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@
#include <time.h>
#include <unistd.h>

#if defined(__has_feature)
#if __has_feature(memory_sanitizer)
#include <sanitizer/msan_interface.h>
#endif
#endif

#ifndef __NR_io_uring_setup
# define __NR_io_uring_setup 425
#endif
Expand Down Expand Up @@ -1347,6 +1353,11 @@ static void uv__epoll_ctl_flush(int epollfd,
void uv__io_poll(uv_loop_t* loop, int timeout) {
uv__loop_internal_fields_t* lfields;
struct epoll_event events[1024];
#if defined(__has_feature)
#if __has_feature(memory_sanitizer)
__msan_unpoison(events, 1024);
#endif
#endif
struct epoll_event prep[256];
struct uv__invalidate inv;
struct epoll_event* pe;
Expand Down
10 changes: 0 additions & 10 deletions src/unix/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@ RB_GENERATE_STATIC(uv__signal_tree_s,
static void uv__signal_global_reinit(void);

static void uv__signal_global_init(void) {
if (uv__signal_lock_pipefd[0] == -1)
/* pthread_atfork can register before and after handlers, one
* for each child. This only registers one for the child. That
* state is both persistent and cumulative, so if we keep doing
* it the handler functions will be called multiple times. Thus
* we only want to do it once.
*/
if (pthread_atfork(NULL, NULL, &uv__signal_global_reinit))
abort();

uv__signal_global_reinit();
}

Expand Down