From b2c952a6fa507ed708edf3d399c91bfcaf9215c7 Mon Sep 17 00:00:00 2001 From: Nicholas-Baron Date: Wed, 14 Apr 2021 23:25:46 -0700 Subject: [PATCH] Base: Add documentation for `get_process_name` `set_process_name` has a getter pair (which it links to); lets document it. Solves #6007. --- Base/usr/share/man/man2/get_process_name.md | 28 +++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Base/usr/share/man/man2/get_process_name.md diff --git a/Base/usr/share/man/man2/get_process_name.md b/Base/usr/share/man/man2/get_process_name.md new file mode 100644 index 00000000000000..7136b2ed388068 --- /dev/null +++ b/Base/usr/share/man/man2/get_process_name.md @@ -0,0 +1,28 @@ +## Name + +get\_process\_name - get the process name + +## Synopsis + +```**c++ +#include + +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)