English 中文(简体)
不管怎样使用;我如何找到儿童进程的助手?
原标题:Using Forever; how can I find out the pid of a child process?
  • 时间:2012-04-04 23:10:18
  •  标签:
  • node.js

http://github.com/nodejitsu/forever“rel=“nofollow”>Forever,载于我的Node.js app。 我开始这样的儿童进程:

var forever = require( forever );

child = new (forever.Monitor)( path/to/my/server.js , {
    max: 3,
    silent: true,
    options: []
});

child.start();

我怎么能找到这一儿童进程的id子?

最佳回答
var forever = require( forever );

child = new (forever.Monitor)( path/to/my/server.js , {
    max: 3,
    silent: true,
    options: []
});

child.on( start , function(process, data) { console.log(data.pid); });
child.start();

列举了启动活动,而第二个论点的原始财产则属于这一追随职能。

问题回答

暂无回答




相关问题
How to make Sequelize use singular table names

I have an model called User but Sequelize looks for the table USERS whenever I am trying to save in the DB. Does anyone know how to set Sequelize to use singular table names? Thanks.

What is Node.js? [closed]

I don t fully get what Node.js is all about. Maybe it s because I am mainly a web based business application developer. What is it and what is the use of it? My understanding so far is that: The ...

Clientside going serverside with node.js

I`ve been looking for a serverside language for some time, and python got my attention somewhat. But as I already know and love javascript, I now want learn to code on the server with js and node.js. ...

Can I use jQuery with Node.js?

Is it possible to use jQuery selectors/DOM manipulation on the server-side using Node.js?

How do I escape a string for a shell command in node?

In nodejs, the only way to execute external commands is via sys.exec(cmd). I d like to call an external command and give it data via stdin. In nodejs there does yet not appear to be a way to open a ...

热门标签