1
0
mirror of https://github.com/lammertb/libhttp.git synced 2025-08-31 03:22:04 +03:00

Added utility function docs

This commit is contained in:
Lammert Bies
2016-12-15 21:16:33 +01:00
parent f7eae71010
commit be70bd1569
6 changed files with 166 additions and 0 deletions

26
doc/api/httplib_kill.md Normal file
View File

@@ -0,0 +1,26 @@
# LibHTTP API Reference
### `httplib_kill( pid, sig );`
### Parameters
| Parameter | Type | Description |
| :--- | :--- | :--- |
|**`pid`**|`pid_t`| The process identifier of the process |
|**`sig`**|`int`| The signal to be sent to the process |
### Return Value
| Type | Description |
| :--- | :--- |
|`int`|An integer which indicates success or failure|
### Description
The function `httplib_kill()` provides a platform independent way to send a signal to a process. The function uses the Postfix `kill()` functions in environments where that function is supported or emulates that function with own code for other operating systems. The function call returns **0** if sending the signal was successful and **-1** otherwise.
Please note that for non Posix-compliant systems the functionality of the Posix `kill()` function has not been fully implemented. Currently only the `SIGKILL` has been implemented and tested fully. For other signals the functionality is unknown and may not lead to the desired results.
### See Also
* [`httplib_poll();`](httplib_poll.md)