Fix process.argv[0] for child_process.fork.

This commit is contained in:
Cheng Zhao 2013-08-08 16:15:06 +08:00
parent 216f5917bf
commit 574811fee0
2 changed files with 5 additions and 2 deletions

View file

@ -54,6 +54,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* wargv, int argc) {
}
}
// Now that conversion is done, we can finally start.
argv[1] = argv[0];
return node::Start(argc - 1, argv + 1);
}
@ -68,8 +69,10 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* wargv, int argc) {
#include "app/atom_library_main.h"
int main(int argc, const char* argv[]) {
if (argc > 1 && strcmp(argv[1], "--atom-child_process-fork") == 0)
if (argc > 1 && strcmp(argv[1], "--atom-child_process-fork") == 0) {
argv[1] = argv[0];
return node::Start(argc - 1, const_cast<char**>(argv + 1));
}
return AtomMain(argc, argv);
}

2
vendor/node vendored

@ -1 +1 @@
Subproject commit 1383b3f5eb7a8ad385d2b408348c1bd1894bd6bf
Subproject commit e2f116e7877b680d37b1ed534191707930684fd1