Mercurial > octave
annotate libinterp/corefcn/sighandlers.h @ 27919:1891570abac8
update Octave Project Developers copyright for the new year
In files that have the "Octave Project Developers" copyright notice,
update for 2020.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 06 Jan 2020 22:29:51 -0500 |
parents | b442ec6dda5c |
children | bd51beb6205e |
rev | line source |
---|---|
1 | 1 /* |
2 | |
27919
1891570abac8
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
27918
diff
changeset
|
3 Copyright (C) 1993-2020 The Octave Project Developers |
27918
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
4 |
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
5 See the file COPYRIGHT.md in the top-level directory of this distribution |
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
6 or <https://octave.org/COPYRIGHT.html/>. |
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
7 |
1 | 8 |
9 This file is part of Octave. | |
10 | |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
24520
diff
changeset
|
11 Octave is free software: you can redistribute it and/or modify it |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
12 under the terms of the GNU General Public License as published by |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
24520
diff
changeset
|
13 the Free Software Foundation, either version 3 of the License, or |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
14 (at your option) any later version. |
1 | 15 |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
16 Octave is distributed in the hope that it will be useful, but |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
17 WITHOUT ANY WARRANTY; without even the implied warranty of |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
19 GNU General Public License for more details. |
1 | 20 |
21 You should have received a copy of the GNU General Public License | |
7016 | 22 along with Octave; see the file COPYING. If not, see |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
24520
diff
changeset
|
23 <https://www.gnu.org/licenses/>. |
1 | 24 |
25 */ | |
26 | |
2939 | 27 /* |
28 | |
29 The signal blocking macros defined below were adapted from similar | |
30 functions from GNU Bash, the Bourne Again SHell, copyright (C) 1994 | |
31 Free Software Foundation, Inc. | |
32 | |
33 */ | |
34 | |
834 | 35 // This file should always be included after config.h! |
36 | |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
37 #if ! defined (octave_sighandlers_h) |
383 | 38 #define octave_sighandlers_h 1 |
1 | 39 |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21186
diff
changeset
|
40 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21186
diff
changeset
|
41 |
22049
ccf50f029999
move octave_child_list to separate file and define inside namespace
John W. Eaton <jwe@octave.org>
parents:
21988
diff
changeset
|
42 #include "child-list.h" |
3566 | 43 |
22051
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
44 namespace octave |
2705 | 45 { |
22051
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
46 // This type must match the typedef in signal-wrappers.h. |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
47 typedef void sig_handler (int); |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
48 |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
49 struct |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
50 interrupt_handler |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
51 { |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
52 sig_handler *int_handler; |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
53 sig_handler *brk_handler; |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
54 }; |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
55 |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
56 // Nonzero means we have already printed a message for this series of |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
57 // SIGPIPES. We assume that the writer will eventually give up. |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
58 extern int pipe_handler_error_count; |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
59 |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
60 // TRUE means we can be interrupted. |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
61 extern OCTINTERP_API bool can_interrupt; |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
62 |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
63 extern OCTINTERP_API sig_handler * |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
64 set_signal_handler (int sig, sig_handler *h, |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
65 bool restart_syscalls = true); |
2554 | 66 |
22051
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
67 extern OCTINTERP_API sig_handler * |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
68 set_signal_handler (const char *signame, sig_handler *h, |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
69 bool restart_syscalls = true); |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
70 |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
71 extern OCTINTERP_API void install_signal_handlers (void); |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
72 |
24520
c5c11b07598a
refactor signal handling (bug #52757)
John W. Eaton <jwe@octave.org>
parents:
23615
diff
changeset
|
73 extern OCTINTERP_API void respond_to_pending_signals (void); |
22051
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
74 |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
75 extern OCTINTERP_API interrupt_handler catch_interrupts (void); |
1 | 76 |
22051
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
77 extern OCTINTERP_API interrupt_handler ignore_interrupts (void); |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
78 |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
79 extern OCTINTERP_API interrupt_handler |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
80 set_interrupt_handler (const volatile interrupt_handler& h, |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
81 bool restart_syscalls = true); |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
82 |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
83 // TRUE means we should try to enter the debugger on SIGINT. |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
84 extern OCTINTERP_API bool Vdebug_on_interrupt; |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
85 } |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
86 |
1 | 87 #endif |