Skip to content

Commit

Permalink
Fix process.argv[0] for child_process.fork.
Browse files Browse the repository at this point in the history
  • Loading branch information
zcbenz committed Aug 8, 2013
1 parent 216f591 commit 574811f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion app/atom_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion vendor/node
Submodule node updated from 1383b3 to e2f116

0 comments on commit 574811f

Please sign in to comment.