Skip to content

Commit

Permalink
did we exit properly?
Browse files Browse the repository at this point in the history
  • Loading branch information
shiftkey committed Feb 3, 2025
1 parent 92f1254 commit 8118bad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/fs-admin-win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ int WaitForChildProcessToExit(void *child_process, bool test_mode) {
::WaitForSingleObject(process, INFINITE);

DWORD code;
if (::GetExitCodeProcess(process, &code) == 0) return -1;
if (::GetExitCodeProcess(process, &code) == 0) {
printf("GetExitCodeProcess returned unexpected process\n", exit_code);
return -1;
}

printf("child process completed with %lu - %ld\n", code, code);

Expand Down
1 change: 1 addition & 0 deletions src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class Worker : public Napi::AsyncWorker {

void OnOK() {
const std::vector<napi_value> argv{Napi::Number::New(Env(), exit_code)};
printf("OnOK fires with exit code %d\n", exit_code);
Callback().Call(argv);
}
};
Expand Down

0 comments on commit 8118bad

Please sign in to comment.