X-Git-Url: https://pd.if.org/git/?p=pdclib.old;a=blobdiff_plain;f=man3%2Fabort.3;fp=man3%2Fabort.3;h=4062011036691f62a86298a5619984e83f3d1206;hp=0000000000000000000000000000000000000000;hb=c66e7780ad17eb9af82dc61f4e3b44b7f0c890b2;hpb=8ea6754f7b066c496d7c7c68e7695aaec29b253a diff --git a/man3/abort.3 b/man3/abort.3 new file mode 100644 index 0000000..4062011 --- /dev/null +++ b/man3/abort.3 @@ -0,0 +1,52 @@ +.\" This file is part of the Public Domain C Library (PDCLib). +.\" Permission is granted to use, modify, and / or redistribute at will. +.\" +.Dd +.Dt abort 3 +.Os + +.Sh NAME +.Nm abort +.Nd abnormal process termination + +.Sh SYNOPSIS +.In stdlib.h +.Fn "noreturn void abort" "void" + +.Sh DESCRIPTION +.Fn abort +causes abnormal process termination to occur. + +.Pp +First, +.Dv SIGABRT +will be raised, as if by +.Fn raise SIGABRT . +If the signal is not being caught, or the handler which catches the signal +returns, +.Fn abort +will then proceed to cause the process to terminate with a failure exit status. +It is implementation defined whether any open +.Vt FILE +streams are flushed before the process exits. + +.Sh IMPLEMENTATION NOTES +PDCLib implements termination (in the case that the +.Dv SIGABRT +handler returns) by calling +.Fn _Exit EXIT_FAILURE . +Therefore, stream flushing rules for +.Nm +follow those defined for +.Fn _Exit . + +.Sh SEE ALSO +.Xr exit 3 +.Xr quick_exit 3 +.Xr _Exit 3 +.Xr raise 3 + +.Sh STANDARDS +.Fn abort +is first defined in +.St -isoC-90 . \ No newline at end of file