GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
signal-wrappers.h
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 2016-2025 The Octave Project Developers
4//
5// See the file COPYRIGHT.md in the top-level directory of this
6// distribution or <https://octave.org/copyright/>.
7//
8// This file is part of Octave.
9//
10// Octave is free software: you can redistribute it and/or modify it
11// under the terms of the GNU General Public License as published by
12// the Free Software Foundation, either version 3 of the License, or
13// (at your option) any later version.
14//
15// Octave is distributed in the hope that it will be useful, but
16// WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU General Public License for more details.
19//
20// You should have received a copy of the GNU General Public License
21// along with Octave; see the file COPYING. If not, see
22// <https://www.gnu.org/licenses/>.
23//
24////////////////////////////////////////////////////////////////////////
25
26#if ! defined (octave_signal_wrappers_h)
27#define octave_signal_wrappers_h 1
28
29#if ! defined (__cplusplus)
30# include <stdbool.h>
31#endif
32
33#include <sys/types.h>
34
35#if defined (__cplusplus)
36extern "C" {
37#endif
38
39typedef void octave_sig_handler (int);
40
41extern OCTAVE_API int octave_kill_wrapper (pid_t pid, int signum);
42
44
45extern OCTAVE_API bool octave_have_kill (void);
46
47extern OCTAVE_API bool octave_get_sig_number (const char *signame, int *signum);
48
51 bool restart_syscalls);
52
54octave_set_signal_handler_by_name (const char *signame,
55 octave_sig_handler *handler,
56 bool restart_syscalls);
57
60
63
64extern OCTAVE_API int octave_num_signals (void);
65
66extern OCTAVE_API void * octave_block_child (void);
67
68extern OCTAVE_API void octave_unblock_child (void *context);
69
71
73
74extern OCTAVE_API void octave_block_signal_by_name (const char *signame);
75
76extern OCTAVE_API void octave_unblock_signal_by_name (const char *signame);
77
78extern OCTAVE_API void octave_save_signal_mask (void);
79
80extern OCTAVE_API void octave_restore_signal_mask (void);
81
82extern OCTAVE_API void * octave_alloc_signal_mask (void);
83
84extern OCTAVE_API void octave_free_signal_mask (void *mask);
85
86extern OCTAVE_API void octave_get_signal_mask (void *mask);
87
88extern OCTAVE_API void octave_set_signal_mask (void *mask);
89
91
92// This function can be useful for debugging.
93
94extern OCTAVE_API void octave_show_sigmask (const char *);
95
96// The next three functions are defined in cxx-signal-helpers.cc.
97
98extern OCTAVE_API void
100
101extern OCTAVE_API void octave_block_async_signals (void);
102
104
105#if defined (__cplusplus)
106}
107#endif
108
109#endif
double signum(double x)
Definition lo-mappers.h:229
#define OCTAVE_API
Definition main.in.cc:55
void octave_save_signal_mask(void)
void * octave_block_child(void)
void octave_block_interrupt_signal(void)
void octave_create_interrupt_watcher_thread(octave_sig_handler *handler)
int octave_num_signals(void)
void octave_block_signal_by_name(const char *signame)
void octave_unblock_signal_by_name(const char *signame)
void octave_set_signal_mask(void *mask)
void octave_free_signal_mask(void *mask)
bool octave_get_sig_number(const char *signame, int *signum)
void octave_get_signal_mask(void *mask)
char * octave_strsignal_wrapper(int signum)
int octave_kill_wrapper(pid_t pid, int signum)
octave_sig_handler * octave_set_default_signal_handler_by_name(const char *signame)
void octave_unblock_async_signals(void)
void octave_sig_handler(int)
octave_sig_handler * octave_set_signal_handler_by_name(const char *signame, octave_sig_handler *handler, bool restart_syscalls)
void octave_restore_signal_mask(void)
void octave_unblock_interrupt_signal(void)
void octave_show_sigmask(const char *)
void octave_unblock_child(void *context)
void octave_block_async_signals(void)
octave_sig_handler * octave_set_signal_handler_internal(int sig, octave_sig_handler *handler, bool restart_syscalls)
bool octave_have_kill(void)
octave_sig_handler * octave_set_default_signal_handler(int sig)
int octave_raise_wrapper(int signum)
void * octave_alloc_signal_mask(void)