Mercurial > octave
annotate libinterp/corefcn/sighandlers.h @ 30564:796f54d4ddbf stable
update Octave Project Developers copyright for the new year
In files that have the "Octave Project Developers" copyright notice,
update for 2021.
In all .txi and .texi files except gpl.txi and gpl.texi in the
doc/liboctave and doc/interpreter directories, change the copyright
to "Octave Project Developers", the same as used for other source
files. Update copyright notices for 2022 (not done since 2019). For
gpl.txi and gpl.texi, change the copyright notice to be "Free Software
Foundation, Inc." and leave the date at 2007 only because this file
only contains the text of the GPL, not anything created by the Octave
Project Developers.
Add Paul Thomas to contributors.in.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 28 Dec 2021 18:22:40 -0500 |
parents | 939bef0b66e0 |
children | e88a07dec498 |
rev | line source |
---|---|
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
1 //////////////////////////////////////////////////////////////////////// |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
2 // |
30564
796f54d4ddbf
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
3 // Copyright (C) 1993-2022 The Octave Project Developers |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
4 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
5 // See the file COPYRIGHT.md in the top-level directory of this |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
6 // distribution or <https://octave.org/copyright/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
7 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
8 // This file is part of Octave. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
9 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
10 // Octave is free software: you can redistribute it and/or modify it |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
11 // under the terms of the GNU General Public License as published by |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
12 // the Free Software Foundation, either version 3 of the License, or |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
13 // (at your option) any later version. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
14 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
15 // Octave is distributed in the hope that it will be useful, but |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
16 // WITHOUT ANY WARRANTY; without even the implied warranty of |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
18 // GNU General Public License for more details. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
19 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
20 // You should have received a copy of the GNU General Public License |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
21 // along with Octave; see the file COPYING. If not, see |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
22 // <https://www.gnu.org/licenses/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
23 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
24 //////////////////////////////////////////////////////////////////////// |
1 | 25 |
2939 | 26 /* |
27 | |
28 The signal blocking macros defined below were adapted from similar | |
29 functions from GNU Bash, the Bourne Again SHell, copyright (C) 1994 | |
30 Free Software Foundation, Inc. | |
31 | |
32 */ | |
33 | |
834 | 34 // This file should always be included after config.h! |
35 | |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
36 #if ! defined (octave_sighandlers_h) |
383 | 37 #define octave_sighandlers_h 1 |
1 | 38 |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21186
diff
changeset
|
39 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21186
diff
changeset
|
40 |
22049
ccf50f029999
move octave_child_list to separate file and define inside namespace
John W. Eaton <jwe@octave.org>
parents:
21988
diff
changeset
|
41 #include "child-list.h" |
3566 | 42 |
29960
939bef0b66e0
merge "namespace octave" and OCTAVE_NAMESPACE_BEGIN/END blocks
John W. Eaton <jwe@octave.org>
parents:
29358
diff
changeset
|
43 OCTAVE_NAMESPACE_BEGIN |
939bef0b66e0
merge "namespace octave" and OCTAVE_NAMESPACE_BEGIN/END blocks
John W. Eaton <jwe@octave.org>
parents:
29358
diff
changeset
|
44 |
22051
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
45 // 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
|
46 typedef void sig_handler (int); |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
47 |
27932
b018f553fd85
maint: Use Octave coding conventions in libinterp/
Rik <rik@octave.org>
parents:
27923
diff
changeset
|
48 struct interrupt_handler |
22051
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
49 { |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
50 sig_handler *int_handler; |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
51 sig_handler *brk_handler; |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
52 }; |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
53 |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
54 // 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
|
55 // 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
|
56 extern int pipe_handler_error_count; |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
57 |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
58 // TRUE means we can be interrupted. |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
59 extern OCTINTERP_API bool can_interrupt; |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
60 |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
61 extern OCTINTERP_API sig_handler * |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
62 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
|
63 bool restart_syscalls = true); |
2554 | 64 |
22051
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
65 extern OCTINTERP_API sig_handler * |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
66 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
|
67 bool restart_syscalls = true); |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
68 |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
69 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
|
70 |
24520
c5c11b07598a
refactor signal handling (bug #52757)
John W. Eaton <jwe@octave.org>
parents:
23615
diff
changeset
|
71 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
|
72 |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
73 extern OCTINTERP_API interrupt_handler catch_interrupts (void); |
1 | 74 |
22051
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
75 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
|
76 |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
77 extern OCTINTERP_API interrupt_handler |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
78 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
|
79 bool restart_syscalls = true); |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
80 |
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
81 // 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
|
82 extern OCTINTERP_API bool Vdebug_on_interrupt; |
29960
939bef0b66e0
merge "namespace octave" and OCTAVE_NAMESPACE_BEGIN/END blocks
John W. Eaton <jwe@octave.org>
parents:
29358
diff
changeset
|
83 |
939bef0b66e0
merge "namespace octave" and OCTAVE_NAMESPACE_BEGIN/END blocks
John W. Eaton <jwe@octave.org>
parents:
29358
diff
changeset
|
84 OCTAVE_NAMESPACE_END |
22051
6db928d06b07
move signal functions into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22049
diff
changeset
|
85 |
1 | 86 #endif |