From 82ba818ff456bcd6d56a06226e3f27e98fbb55c3 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 14 Aug 2025 22:58:58 -0500 Subject: removing all downloaded devdocs files --- devdocs/c/program%2Fsig_err.html | 49 ---------------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 devdocs/c/program%2Fsig_err.html (limited to 'devdocs/c/program%2Fsig_err.html') diff --git a/devdocs/c/program%2Fsig_err.html b/devdocs/c/program%2Fsig_err.html deleted file mode 100644 index 5e2118d6..00000000 --- a/devdocs/c/program%2Fsig_err.html +++ /dev/null @@ -1,49 +0,0 @@ -

SIG_ERR

Defined in header <signal.h>
#define SIG_ERR /* implementation defined */
-

A value of type void (*)(int). When returned by signal, indicates that an error has occurred.

-

Example

#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
- 
-void signal_handler(int sig)
-{
-    printf("Received signal: %d\n", sig);
-}
- 
-int main(void)
-{
-    /* Install a signal handler. */
-    if (signal(SIGTERM, signal_handler) == SIG_ERR)
-    {
-        printf("Error while installing a signal handler.\n");
-        exit(EXIT_FAILURE);
-    }
- 
-    printf("Sending signal: %d\n", SIGTERM);
-    if (raise(SIGTERM) != 0)
-    {
-        printf("Error while raising the SIGTERM signal.\n");
-        exit(EXIT_FAILURE);
-    }
- 
-    printf("Exit main()\n");
-    return EXIT_SUCCESS;
-}

Output:

-
Sending signal: 15
-Received signal: 15
-Exit main()

References

See also

- -
sets a signal handler for particular signal
(function)
C++ documentation for SIG_ERR
-

- © cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
- https://en.cppreference.com/w/c/program/SIG_ERR -

-
-- cgit v1.2.3