]> git.ipfire.org Git - thirdparty/man-pages.git/commit
abort.3: Clarify consequences of calling abort()
authorTomáš Golembiovský <tgolembi@redhat.com>
Wed, 26 Jul 2023 12:59:30 +0000 (14:59 +0200)
committerAlejandro Colomar <alx@kernel.org>
Fri, 28 Jul 2023 19:27:20 +0000 (21:27 +0200)
commite0a36923ddcf1349b8c557ccf6c80fb59b831eff
tree338932ccefd9683250b89b26361f716d9bb0cfc7
parent80e3024bde68ee3fa55cfd87728b81f94ec931df
abort.3: Clarify consequences of calling abort()

Clarify that atexit(3)/on_exit(3) are not called because those are
called only on normal process termination (as documented on their
respective manual pages).

Check with the following test program:

```c
 #define _DEFAULT_SOURCE

 #include <stdio.h>
 #include <stdlib.h>

void one(void)
{
    puts("atexit called");
}

void two(int, void*)
{
    puts("on_exit called");
}

int main(void)
{
    atexit(one);
    on_exit(two, NULL);

    puts("terminating");
    //abort();
    exit(EXIT_SUCCESS);
}
```

Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Stefan Puiu <stefan.puiu@gmail.com>
Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man3/abort.3