From 39664e93093bd9545ad4085523b122196c449508 Mon Sep 17 00:00:00 2001 From: Jeff Hostetler Date: Thu, 26 May 2022 21:47:07 +0000 Subject: fsmonitor--daemon: cd out of worktree root Teach the fsmonitor--daemon to CD outside of the worktree before starting up. The common Git startup mechanism causes the CWD of the daemon process to be in the root of the worktree. On Windows, this causes the daemon process to hold a locked handle on the CWD and prevents other processes from moving or deleting the worktree while the daemon is running. CD to HOME before entering main event loops. Signed-off-by: Jeff Hostetler Signed-off-by: Junio C Hamano --- fsmonitor--daemon.h | 1 + 1 file changed, 1 insertion(+) (limited to 'fsmonitor--daemon.h') diff --git a/fsmonitor--daemon.h b/fsmonitor--daemon.h index bd09fffc17..223c2131b5 100644 --- a/fsmonitor--daemon.h +++ b/fsmonitor--daemon.h @@ -54,6 +54,7 @@ struct fsmonitor_daemon_state { struct fsmonitor_daemon_backend_data *backend_data; struct ipc_server_data *ipc_server_data; + struct strbuf path_ipc; }; /* -- cgit v1.2.3