note 126802 added to function.cli-set-process-title

From: Date: Tue, 25 Jan 2022 22:12:31 +0000
Subject: note 126802 added to function.cli-set-process-title
Groups: php.notes 
Request: Send a blank email to php-notes+get-217546@lists.php.net to get a copy of this message
cli_set_process_title() change name only for some process manager in linux. In fact this function change value appear in /proc/self/cmdline and not value in /proc/self/comm. This value in comm file is used as name in #ps or #pstree and other process manager. For changing proccess name completly in linux you could add after cli_set_process_title() this code: $f = fopen('/proc/self/comm','w'); if ($f) { fwrite($f, 'my-new-app-name'); fclose($f); ---- Server IP: 45.112.84.4 Probable Submitter: 80.90.5.135 (proxied: 109.71.213.40) ---- Manual Page -- https://php.net/manual/en/function.cli-set-process-title.php Edit -- https://main.php.net/note/edit/126802 Del: integrated -- https://main.php.net/note/delete/126802/integrated Del: useless -- https://main.php.net/note/delete/126802/useless Del: bad code -- https://main.php.net/note/delete/126802/bad+code Del: spam -- https://main.php.net/note/delete/126802/spam Del: non-english -- https://main.php.net/note/delete/126802/non-english Del: in docs -- https://main.php.net/note/delete/126802/in+docs Del: other reasons-- https://main.php.net/note/delete/126802 Reject -- https://main.php.net/note/reject/126802 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#217546) next »