Rev 4874 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4874 | Rev 4921 | ||
---|---|---|---|
1 | /* NetWare can not use this implementation of abort. It provides its |
1 | /* NetWare can not use this implementation of abort. It provides its |
2 | own version of abort in clib.nlm. If we can not use clib.nlm, then |
2 | own version of abort in clib.nlm. If we can not use clib.nlm, then |
3 | we must write abort in sys/netware. */ |
3 | we must write abort in sys/netware. */ |
4 | 4 | ||
5 | #ifdef ABORT_PROVIDED |
5 | #ifdef ABORT_PROVIDED |
6 | 6 | ||
7 | int _dummy_abort = 1; |
7 | int _dummy_abort = 1; |
8 | 8 | ||
9 | #else |
9 | #else |
10 | 10 | ||
11 | /* |
11 | /* |
12 | FUNCTION |
12 | FUNCTION |
13 | < |
13 | < |
14 | 14 | ||
15 | INDEX |
15 | INDEX |
16 | abort |
16 | abort |
17 | 17 | ||
18 | ANSI_SYNOPSIS |
18 | ANSI_SYNOPSIS |
19 | #include |
19 | #include |
20 | void abort(void); |
20 | void abort(void); |
21 | 21 | ||
22 | TRAD_SYNOPSIS |
22 | TRAD_SYNOPSIS |
23 | #include |
23 | #include |
24 | void abort(); |
24 | void abort(); |
25 | 25 | ||
26 | DESCRIPTION |
26 | DESCRIPTION |
27 | Use < |
27 | Use < |
28 | cannot deal with. Normally, < |
28 | cannot deal with. Normally, < |
29 | 29 | ||
30 | Before terminating your program, < |
30 | Before terminating your program, < |
31 | (using `< |
31 | (using `< |
32 | an exception handler for this condition, that handler has the |
32 | an exception handler for this condition, that handler has the |
33 | opportunity to retain control, thereby avoiding program termination. |
33 | opportunity to retain control, thereby avoiding program termination. |
34 | 34 | ||
35 | In this implementation, < |
35 | In this implementation, < |
36 | file-related cleanup (the host environment may do so; if not, you can |
36 | file-related cleanup (the host environment may do so; if not, you can |
37 | arrange for your program to do its own cleanup with a < |
37 | arrange for your program to do its own cleanup with a < |
38 | exception handler). |
38 | exception handler). |
39 | 39 | ||
40 | RETURNS |
40 | RETURNS |
41 | < |
41 | < |
42 | 42 | ||
43 | PORTABILITY |
43 | PORTABILITY |
44 | ANSI C requires < |
44 | ANSI C requires < |
45 | 45 | ||
46 | Supporting OS subroutines required: <<_exit>> and optionally, < |
46 | Supporting OS subroutines required: <<_exit>> and optionally, < |
47 | */ |
47 | */ |
48 | 48 | ||
49 | #include |
49 | #include |
50 | #include |
50 | #include |
51 | #include |
51 | #include |
52 | 52 | ||
53 | _VOID |
53 | _VOID |
54 | _DEFUN_VOID (abort) |
54 | _DEFUN_VOID (abort) |
55 | { |
55 | { |
56 | #ifdef ABORT_MESSAGE |
56 | #ifdef ABORT_MESSAGE |
57 | write (2, "Abort called\n", sizeof ("Abort called\n")-1); |
57 | write (2, "Abort called\n", sizeof ("Abort called\n")-1); |
58 | #endif |
58 | #endif |
59 | 59 | ||
60 | while (1) |
60 | while (1) |
61 | { |
61 | { |
62 | // raise (SIGABRT); |
62 | raise (SIGABRT); |
63 | _exit (1); |
63 | _exit (1); |
64 | } |
64 | } |
65 | } |
65 | } |
66 | 66 | ||
67 | #endif |
67 | #endif |