MCPcopy
hub / github.com/Unitech/pm2 / exec

Function exec

lib/API/Version.js:246–265  ·  view source on GitHub ↗
(cmd, callback)

Source from the content-addressed store, hash-verified

244 };
245
246 var exec = function (cmd, callback) {
247 var output = '';
248
249 var c = child.exec(cmd, {
250 env: process.env,
251 maxBuffer: 3*1024*1024,
252 timeout: EXEC_TIMEOUT
253 }, function(err) {
254 if (callback)
255 callback(err ? err.code : 0, output);
256 });
257
258 c.stdout.on('data', function(data) {
259 output += data;
260 });
261
262 c.stderr.on('data', function(data) {
263 output += data;
264 });
265 };
266
267 /**
268 *

Callers 10

LogManagement.jsFile · 0.70
execCommandsFunction · 0.70
checkDockerSetupFunction · 0.70
handleExitFunction · 0.70
launchFunction · 0.50
TreeKill.jsFile · 0.50
packagerFunction · 0.50
runFunction · 0.50
buildContainerFunction · 0.50
API.jsFile · 0.50

Calls 1

onMethod · 0.65

Tested by 1

launchFunction · 0.40

Used in the wild real call sites across dependent graphs

searching dependent graphs…