From: "Tomáš Golembiovský" <tgolembi@redhat.com>
To: Alejandro Colomar <alx@kernel.org>
Cc: linux-man@vger.kernel.org,
"G. Branden Robinson" <g.branden.robinson@gmail.com>,
Stefan Puiu <stefan.puiu@gmail.com>
Subject: Re: [PATCH v4] abort: clarify consequences of calling abort
Date: Thu, 20 Jul 2023 17:40:15 +0200 [thread overview]
Message-ID: <ZLlVX-HPL1PS6RXL@cremorrah> (raw)
In-Reply-To: <5c8c0d88151e70a69c8613ad87c4441472d3ad95.1689867426.git.tgolembi@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 323 bytes --]
Hi,
attached is a small test program. Compile simply with:
$ gcc atexit.c -o atexit
When running the test I get:
$ ./atexit
terminating
on_exit called
atexit called
When the abort() call is uncommented I get:
$ ./atexit
terminating
Aborted (core dumped)
Hope this helps,
Tomas
[-- Attachment #2: atexit.c --]
[-- Type: text/plain, Size: 292 bytes --]
#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);
}
next prev parent reply other threads:[~2023-07-20 15:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-20 15:38 [PATCH v4] abort: clarify consequences of calling abort Tomáš Golembiovský
2023-07-20 15:40 ` Tomáš Golembiovský [this message]
2023-07-26 11:38 ` G. Branden Robinson
2023-07-26 12:56 ` Tomáš Golembiovský
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZLlVX-HPL1PS6RXL@cremorrah \
--to=tgolembi@redhat.com \
--cc=alx@kernel.org \
--cc=g.branden.robinson@gmail.com \
--cc=linux-man@vger.kernel.org \
--cc=stefan.puiu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox