0.41.2 Move yt_url_encode() docs, document signal globals in zynk.c.
- Moved doc comment block for yt_url_encode() from top of cmd_yt.h to immediately before the function definition for better readability. - Added doc comments to volatile sig_atomic_t running variable describing its purpose as main loop control flag and async-signal-safety. - Added doc comments to start_time variable explaining its role in uptime calculation. - Updated CHANGELOG.md to reflect yt_url_encode() doc comment move.
This commit is contained in:
parent
84fd78f0a0
commit
11bf7e624d
3 changed files with 29 additions and 14 deletions
14
zynk.c
14
zynk.c
|
|
@ -259,7 +259,21 @@ void reload_do(Session *s, const char *reply_target, int exec_new) {
|
|||
|
||||
/* ---- signal handling ---- */
|
||||
|
||||
/*
|
||||
* running - Main loop control flag, set to 0 by signal handlers.
|
||||
*
|
||||
* Checked by the main poll loop to determine when to shut down.
|
||||
* Declared volatile sig_atomic_t for async-signal-safety: SIGINT and
|
||||
* SIGTERM handlers set it to 0, causing the loop to exit gracefully.
|
||||
*/
|
||||
volatile sig_atomic_t running = 1;
|
||||
|
||||
/*
|
||||
* start_time - Timestamp when the bot process started.
|
||||
*
|
||||
* Set once during initialization, used by the !uptime command to
|
||||
* calculate and display the bot's running time.
|
||||
*/
|
||||
time_t start_time;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue