Skip to content

Commit c642e8f

Browse files
committed
fixup! mingw: kill child processes in a gentler way
exit-process(win32): require caller to close process handle Before this change, it was a bit unclear whose responsibility it was to close that handle, and Coverity pointed out that there were cases where the handle would be closed twice. Let's make the logic much easier to reason about: It is the duty of any caller of exit_process()/terminate_process_tree() to close the handle, period. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent f1321a7 commit c642e8f

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

compat/mingw.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1660,14 +1660,14 @@ struct tm *localtime_r(const time_t *timep, struct tm *result)
16601660

16611661
char *mingw_strbuf_realpath(struct strbuf *resolved, const char *path)
16621662
{
1663-
wchar_t wpath[MAX_PATH];
1663+
wchar_t wpath[MAX_LONG_PATH];
16641664
HANDLE h;
16651665
DWORD ret;
16661666
int len;
16671667
const char *last_component = NULL;
16681668
char *append = NULL;
16691669

1670-
if (xutftowcs_path(wpath, path) < 0)
1670+
if (xutftowcs_long_path(wpath, path) < 0)
16711671
return NULL;
16721672

16731673
h = CreateFileW(wpath, 0,
@@ -3926,16 +3926,16 @@ static int acls_supported(const char *path)
39263926

39273927
int is_path_owned_by_current_sid(const char *path, struct strbuf *report)
39283928
{
3929-
WCHAR wpath[MAX_PATH];
3929+
WCHAR wpath[MAX_LONG_PATH];
39303930
PSID sid = NULL;
39313931
PSECURITY_DESCRIPTOR descriptor = NULL;
39323932
DWORD err;
39333933

3934-
static wchar_t home[MAX_PATH];
3934+
static wchar_t home[MAX_LONG_PATH];
39353935

39363936
int result = 0;
39373937

3938-
if (xutftowcs_path(wpath, path) < 0)
3938+
if (xutftowcs_long_path(wpath, path) < 0)
39393939
return 0;
39403940

39413941
/*

0 commit comments

Comments
 (0)