开发者

Controlling the name of a forked process

开发者 https://www.devze.com 2023-02-16 02:47 出处:网络
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:

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

精彩评论

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