Skip to content

Commit db5b0ba

Browse files
staticfloatvtjnash
andauthored
Apply suggestions from code review
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
1 parent 8f581c2 commit db5b0ba

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ AM_CONDITIONAL([OS400], [AS_CASE([$host_os],[os400], [true], [false])
7474
AM_CONDITIONAL([SUNOS], [AS_CASE([$host_os],[solaris*], [true], [false])])
7575
AM_CONDITIONAL([WINNT], [AS_CASE([$host_os],[mingw*], [true], [false])])
7676
AS_CASE([$host_os],[mingw*], [
77-
LIBS="$LIBS -lws2_32 -lpsapi -liphlpapi -lshell32 -lsecur32 -luserenv -luser32 -lwer -ldbghelp"
77+
LIBS="$LIBS -lws2_32 -lpsapi -liphlpapi -lshell32 -lsecur32 -luserenv -luser32 -ldbghelp -lole32 -luuid"
7878
])
7979
AS_CASE([$host_os], [netbsd*], [AC_CHECK_LIB([kvm], [kvm_open])])
8080
AS_CASE([$host_os], [kfreebsd*], [

src/win/process.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,11 +1252,13 @@ static int uv__kill(HANDLE process_handle, int signum) {
12521252
return UV_EINVAL;
12531253
}
12541254

1255-
// Create a dump file for the targeted process, if the registry key
1256-
// `HKLM:Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\DumpFolder`
1257-
// points to a valid folder. The default value if the registry key does not
1258-
// exist is `%LOCALAPPDATA%\CrashDumps`, see [0] for more detail.
1259-
// [0]: https://learn.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps
1255+
/*
1256+
* Create a dump file for the targeted process, if the registry key
1257+
* `HKLM:Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\DumpFolder`
1258+
* points to a valid folder. The default value if the registry key does not
1259+
* exist is `%LOCALAPPDATA%\CrashDumps`, see [0] for more detail.
1260+
* [0]: https://learn.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps
1261+
*/
12601262
if (signum == SIGQUIT) {
12611263
// Get process name
12621264
WCHAR basename[MAX_PATH];
@@ -1287,11 +1289,10 @@ static int uv__kill(HANDLE process_handle, int signum) {
12871289
// Default value for `dump_folder` is `%LOCALAPPDATA%\CrashDumps`
12881290
WCHAR * localappdata;
12891291
SHGetKnownFolderPath(&FOLDERID_LocalAppData, 0, NULL, &localappdata);
1290-
swprintf_s(dump_folder, sizeof(dump_folder), L"%ls\\CrashDumps", localappdata);
1292+
_snwprintf(dump_folder, sizeof(dump_folder), L"%ls\\CrashDumps", localappdata);
12911293
CoTaskMemFree(localappdata);
12921294
}
12931295
RegCloseKey(registry_key);
1294-
}
12951296

12961297
// Construct dump filename
12971298
WCHAR dump_name[MAX_PATH];

0 commit comments

Comments
 (0)