diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-11-20 14:42:57 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-11-20 14:42:57 +0900 |
| commit | f1a50f12b94701a3a1103f51f4ef31ee7e413743 (patch) | |
| tree | 91a50a31ed022891f44a46c8728f1a5a5e9e8414 /builtin | |
| parent | Merge branch 'ds/line-log-asan-fix' into maint-2.47 (diff) | |
| parent | fsmonitor: initialize fs event listener before accepting clients (diff) | |
| download | git-f1a50f12b94701a3a1103f51f4ef31ee7e413743.tar.gz git-f1a50f12b94701a3a1103f51f4ef31ee7e413743.zip | |
Merge branch 'jk/fsmonitor-event-listener-race-fix' into maint-2.47
On macOS, fsmonitor can fall into a race condition that results in
a client waiting forever to be notified for an event that have
already happened. This problem has been corrected.
* jk/fsmonitor-event-listener-race-fix:
fsmonitor: initialize fs event listener before accepting clients
simple-ipc: split async server initialization and running
Diffstat (limited to 'builtin')
| -rw-r--r-- | builtin/fsmonitor--daemon.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/fsmonitor--daemon.c b/builtin/fsmonitor--daemon.c index e1e6b96d09..f3f6bd330b 100644 --- a/builtin/fsmonitor--daemon.c +++ b/builtin/fsmonitor--daemon.c @@ -1208,9 +1208,9 @@ static int fsmonitor_run_daemon_1(struct fsmonitor_daemon_state *state) * system event listener thread so that we have the IPC handle * before we need it. */ - if (ipc_server_run_async(&state->ipc_server_data, - state->path_ipc.buf, &ipc_opts, - handle_client, state)) + if (ipc_server_init_async(&state->ipc_server_data, + state->path_ipc.buf, &ipc_opts, + handle_client, state)) return error_errno( _("could not start IPC thread pool on '%s'"), state->path_ipc.buf); |
