2020-07-27 18:46:13 +02:00
|
|
|
## Name
|
|
|
|
|
|
|
|
|
|
set\_process\_name - change the process name
|
|
|
|
|
|
|
|
|
|
## Synopsis
|
|
|
|
|
|
|
|
|
|
```**c++
|
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
|
|
int set_process_name(const char* name, size_t name_length);
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Description
|
|
|
|
|
|
2021-03-08 00:19:37 +01:00
|
|
|
`set_process_name()` changes the name of the calling process to the string `name` with length `name_length`.
|
2020-07-27 18:46:13 +02:00
|
|
|
|
|
|
|
|
## Pledge
|
|
|
|
|
|
|
|
|
|
In pledged programs, the `proc` promise is required for this system call.
|
|
|
|
|
|
|
|
|
|
## Errors
|
|
|
|
|
|
|
|
|
|
* `EFAULT`: `name` is not in readable memory.
|
|
|
|
|
* `ENAMETOOLONG`: `name_length` is too long.
|
|
|
|
|
|
|
|
|
|
## See also
|
|
|
|
|
|
|
|
|
|
* [`get_process_name`(2)](../man2/get_process_name.md)
|