Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryorkie <yorkiefixer@gmail.com>2016-08-21 08:17:47 +0300
committeryorkie <yorkiefixer@gmail.com>2016-08-30 23:22:43 +0300
commita3c5567eb47738bc8a95592bf43343008bb80861 (patch)
treeaac1dc86ca2c194d5bee2346794ba99922b82b5c /src/node_main.cc
parent86067f0129a7f0dc30ad867a5a50941ceb00263b (diff)
src,win: use correct exit code in old versions
If `IsWindows7OrGreater()` returns `false`, the Node.js program should exit with a more specific code ERROR_EXE_MACHINE_TYPE_MISMATCH instead the code 0x1(ERROR_INVALID_FUNCTION) PR-URL: https://github.com/nodejs/node/pull/8204 Reviewed-By: João Reis <reis@janeasystems.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'src/node_main.cc')
-rw-r--r--src/node_main.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node_main.cc b/src/node_main.cc
index bde39756249..16bda81ae64 100644
--- a/src/node_main.cc
+++ b/src/node_main.cc
@@ -2,12 +2,13 @@
#ifdef _WIN32
#include <VersionHelpers.h>
+#include <WinError.h>
int wmain(int argc, wchar_t *wargv[]) {
if (!IsWindows7OrGreater()) {
fprintf(stderr, "This application is only supported on Windows 7, "
"Windows Server 2008 R2, or higher.");
- exit(1);
+ exit(ERROR_EXE_MACHINE_TYPE_MISMATCH);
}
// Convert argv to to UTF8