开发者

Controlling the name of a forked process

I'd like to have control over the name a of a process that is forked from a Perl script. Ideally it would go something like this:

./forker.pl
 | ...
 |
 | fork("forked.pl");
 |\
开发者_如何学JAVA | \
 |  `--------\
 |            \
forker.pl     forked.pl

...as seen by by top or ps.

Is this possible?


If the OS permits it at all,

$0 = 'forked.pl';


Perchance can this module help you: http://metacpan.org/pod/Sys::Prctl . This under the assumption that you are on a Linux platform.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜