Added wofi_exit(). This allows correct handling of custom exit status codes on non-glibc systems. This function should always be used for exiting wofi as libc exit() will no longer correctly handle error situations.

This commit is contained in:
Scoopta
2024-02-07 18:16:11 -08:00
parent 32795acb20
commit a6e66d7cb7
7 changed files with 45 additions and 31 deletions

View File

@@ -110,3 +110,7 @@ Runs the provided cmd in a terminal emulator. The following order is used for pi
.B const char* cmd
\- The command to run, this is invoked by doing \fBterm \-\- cmd\fR.
.TP
.B void wofi_exit(void)
This function is how you should call to exit wofi. It checks the status given and only sets a custom exit code if you pass EXIT_SUCCESS. If you call the libc exit() function then the custom exit code will always be used even if an error should be reported