Skip to content

Commit

Permalink
Base: Add documentation for get_process_name
Browse files Browse the repository at this point in the history
`set_process_name` has a getter pair (which it links to); lets document it.

Solves SerenityOS#6007.
  • Loading branch information
Nicholas-Baron authored and awesomekling committed Apr 15, 2021
1 parent b6093ae commit b2c952a
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Base/usr/share/man/man2/get_process_name.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## Name

get\_process\_name - get the process name

## Synopsis

```**c++
#include <unistd.h>
int get_process_name(char* buffer, int buffer_length);
```

## Description

`get_process_name()` places the current process name into the provided `buffer`.

## Pledge

In pledged programs, the `stdio` promise is required for this system call.

## Errors

* `EFAULT`: the process name could not be copied into the buffer.
* `ENAMETOOLONG`: `buffer_length` is too short.

## See also

* [`set_process_name`(2)](../man2/set_process_name.md)

0 comments on commit b2c952a

Please sign in to comment.