Skip to content

Commit

Permalink
Merge pull request #3466 from natcl/development
Browse files Browse the repository at this point in the history
Add windowsHide option to allow Windows popup from pm2 process file
  • Loading branch information
wallet77 authored Feb 19, 2018
2 parents 41815e0 + f305d6d commit c6d7ace
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/API/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,5 +213,9 @@
"instance_var": {
"type": "string",
"default" : "NODE_APP_INSTANCE"
},
"windowsHide": {
"type": "boolean",
"default" : true
}
}
8 changes: 7 additions & 1 deletion lib/God/ForkMode.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,17 @@ module.exports = function ForkMode(God) {
return cb(err);
};

var windowsHide;
if (typeof(pm2_env.windowsHide) === "boolean") {
windowsHide = pm2_env.windowsHide;
} else {
windowsHide = true;
}
try {
var cspr = spawn(command, args, {
env : pm2_env,
detached : true,
windowsHide: true,
windowsHide: windowsHide,
cwd : pm2_env.pm_cwd || process.cwd(),
stdio : ['pipe', 'pipe', 'pipe', 'ipc'] //Same as fork() in node core
});
Expand Down

0 comments on commit c6d7ace

Please sign in to comment.