Skip to content
Open
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
11 changes: 10 additions & 1 deletion src/native/windows/apps/prunsrv/prunsrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1999,8 +1999,17 @@ void WINAPI serviceMain(DWORD argc, LPTSTR *argv)
apxLogWrite(APXLOG_MARK_DEBUG "Waiting %d milliseconds for all threads to exit.", timeout);
reportServiceStatus(SERVICE_STOP_PENDING, NO_ERROR, ONE_MINUTE_AS_MILLIS);
if (!apxDestroyJvm(timeout)) {
/* if we are not using JAVA apxDestroyJvm does nothing, check the chid processes in case they hang */
/* if we are not using JAVA apxDestroyJvm does nothing */
apxLogWrite(APXLOG_MARK_DEBUG "apxDestroyJvm did nothing or failed");
/* detach service process from console */
if (GetConsoleWindow() != NULL) {
apxLogWrite(APXLOG_MARK_DEBUG "Detaching service from console");
if (FreeConsole())
apxLogWrite(APXLOG_MARK_DEBUG "Service detached from console");
else
apxLogWrite(APXLOG_MARK_DEBUG "Failed to detach service from console");
}
/* check the chid processes in case they hang */
for (;;) {
if (!apxProcessTerminateChild( GetCurrentProcessId(), TRUE)) {
/* Just print the children processes once for debugging */
Expand Down