#29479 [Com]: changing current process name

From: Date: Thu, 06 Oct 2005 13:41:20 +0000
Subject: #29479 [Com]: changing current process name
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-86128@lists.php.net to get a copy of this message
 ID:               29479
 Comment by:       unclemonty at gmail dot com
 Reported By:      black at scene-si dot org
 Status:           Suspended
 Bug Type:         *General Issues
 Operating System: linux
 PHP Version:      Irrelevant
 New Comment:

Did the situation ever change with this? How about a work-around?


Previous Comments:
------------------------------------------------------------------------

[2004-08-01 13:25:48] wez@php.net

setproctitle() is only implemented on BSD; other systems that emulate
this use a non-portable dangerous hack that makes certain assumptions
about how the process will be run.

Suspending until this situation changes.

------------------------------------------------------------------------

[2004-08-01 10:43:06] black at scene-si dot org

Description:
------------
With linux it is sometimes useful to be able to change the process name
(by identifying a process in the system error logs or for debugging for
example)..

The c(++) or the perl way doesnt work in php as far as i tried, and so
i pressume that it is not possible itself.

You can consult yourself with
http://lightconsulting.com/~thalakan/process-title-notes.html
- an
extensive example of how the title should be changed

Reproduce code:
---------------
$argv[0] = "progname-debugval";

Expected result:
----------------
I expect that the programs process title would be changed by modifying
$argv[0], or by introducing a new function which would change the
process title respectively.

Actual result:
--------------
The process name in ps output of the respective program should change
accordingly to the change of $argv[0];


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=29479&edit=1


Thread (12 messages)

« previous php.bugs (#86128) next »