* tests/test-sigpipe.c (handler): Invoke _exit, not exit.
* tests/test-raise.c (handler): Update comments after 2020-11-25 change.
2023-09-04 Bruno Haible <bruno@clisp.org>
+ sigpipe tests: Fix -Wanalyzer-unsafe-call-within-signal-handler warning.
+ * tests/test-sigpipe.c (handler): Invoke _exit, not exit.
+ * tests/test-raise.c (handler): Update comments after 2020-11-25 change.
+
argp: Distinguish NULL and '\0' from 0.
* lib/argp-pin.c: Include <stddef.h>.
(program_invocation_short_name, program_invocation_name): Use NULL
#include "macros.h"
-/* It is safe to use _Noreturn here: exit() never returns, and GCC knows that
- exit() is a non-returning function, even on platforms where its declaration
- in <stdlib.h> does not have the 'noreturn' attribute. */
+/* It is safe to use _Noreturn here: _exit() never returns, and GCC knows that
+ _exit() is a non-returning function, even on platforms where its declaration
+ in <unistd.h> does not have the 'noreturn' attribute. */
static _Noreturn void
handler (_GL_UNUSED int sig)
{
static void
handler (int sig)
{
- exit (0);
+ _exit (0);
}
int