From 8b25899b4c04e7b25fb2318b51b6390f9d5474e8 Mon Sep 17 00:00:00 2001 From: tedu <> Date: Wed, 14 May 2014 21:54:20 +0000 Subject: stop flushing streams in abort(). it's hackish and unsafe, and no longer required. try to document this fact and some of the history. with feedback from deraadt guenther millert --- src/lib/libc/stdlib/abort.3 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/lib/libc/stdlib/abort.3') diff --git a/src/lib/libc/stdlib/abort.3 b/src/lib/libc/stdlib/abort.3 index 322d629930..2f15cd827c 100644 --- a/src/lib/libc/stdlib/abort.3 +++ b/src/lib/libc/stdlib/abort.3 @@ -29,9 +29,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: abort.3,v 1.10 2013/07/17 05:42:11 schwarze Exp $ +.\" $OpenBSD: abort.3,v 1.11 2014/05/14 21:54:20 tedu Exp $ .\" -.Dd $Mdocdate: July 17 2013 $ +.Dd $Mdocdate: May 14 2014 $ .Dt ABORT 3 .Os .Sh NAME @@ -48,7 +48,8 @@ function causes abnormal program termination to occur, unless the signal .Dv SIGABRT is being caught and the signal handler does not return. .Pp -Any open streams are flushed and closed. +Some implementations may flush output streams before terminating. +This implementation does not. .Sh RETURN VALUES The .Fn abort @@ -66,3 +67,11 @@ The .Fn abort function first appeared in .At v5 . +.Pp +Historically, previous standards required +.Fn abort +to flush and close output streams, but this conflicted with the requirement +that +.Fn abort +be async signal safe. +As a result, the flushing requirement was dropped. -- cgit v1.2.3-55-g6feb