Skip to content

Make max title length configurable, or allow truncation of original process title #1

@dominics

Description

@dominics

At the moment, only up to MAX_TITLE_LENGTH characters of the process title are overwritten, but the rest of the former process title remains.

$ cat test.php
<?php
  setproctitle('01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789');
  sleep(20);
$ php test.php This is the original process name, and the first part is overwritten, but the part at the end here will still remain in the process title
[...]
$ ps aux | grep 01234
user   21183  0.2  1.5 240464 15376 pts/3    T    00:41   0:00 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456 n in the process title

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions