mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
Base: Add man pages for gettid(), getpid(), and getppid()
This commit is contained in:
parent
d4fe3e8009
commit
6b3a7b1ce7
Notes:
sideshowbarker
2024-07-19 05:07:52 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/6b3a7b1ce72
3 changed files with 84 additions and 0 deletions
28
Base/usr/share/man/man2/getpid.md
Normal file
28
Base/usr/share/man/man2/getpid.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
## Name
|
||||
|
||||
getpid - get current process ID
|
||||
|
||||
## Synopsis
|
||||
|
||||
```**c++
|
||||
#include <unistd.h>
|
||||
|
||||
pid_t getpid();
|
||||
```
|
||||
|
||||
## Description
|
||||
|
||||
Returns the PID (process ID) of the calling process.
|
||||
|
||||
## Return value
|
||||
|
||||
The process ID of the calling process.
|
||||
|
||||
## Errors
|
||||
|
||||
None.
|
||||
|
||||
## See also
|
||||
|
||||
* [`getppid`(2)](getppid.md)
|
||||
* [`gettid`(2)](gettid.md)
|
28
Base/usr/share/man/man2/getppid.md
Normal file
28
Base/usr/share/man/man2/getppid.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
## Name
|
||||
|
||||
getppid - get current process's parent process ID
|
||||
|
||||
## Synopsis
|
||||
|
||||
```**c++
|
||||
#include <unistd.h>
|
||||
|
||||
pid_t getppid();
|
||||
```
|
||||
|
||||
## Description
|
||||
|
||||
Returns the PID (process ID) of the parent of the calling process.
|
||||
|
||||
## Return value
|
||||
|
||||
The process ID of the parent of the calling process.
|
||||
|
||||
## Errors
|
||||
|
||||
None.
|
||||
|
||||
## See also
|
||||
|
||||
* [`getpid`(2)](getpid.md)
|
||||
* [`gettid`(2)](gettid.md)
|
28
Base/usr/share/man/man2/gettid.md
Normal file
28
Base/usr/share/man/man2/gettid.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
## Name
|
||||
|
||||
gettid - get current thread ID
|
||||
|
||||
## Synopsis
|
||||
|
||||
```**c++
|
||||
#include <unistd.h>
|
||||
|
||||
int gettid();
|
||||
```
|
||||
|
||||
## Description
|
||||
|
||||
Returns the TID (thread ID) of the calling thread. The first thread in a process has the same TID and PID. Subsequently spawned threads will have unique thread ID's, but all share the same PID.
|
||||
|
||||
## Return value
|
||||
|
||||
The thread ID of the calling thread.
|
||||
|
||||
## Error
|
||||
|
||||
None.
|
||||
|
||||
## See also
|
||||
|
||||
* [`getpid`(2)](getpid.md)
|
||||
* [`getppid`(2)](getppid.md)
|
Loading…
Reference in a new issue