Skip to content
Newer
Older
100644 38 lines (27 sloc) 660 Bytes
07fc27b Hook up signal delivery
Evan Phoenix authored
1 #ifndef RBX_SIGNAL_HPP
2 #define RBX_SIGNAL_HPP
3
4 #include "util/thread.hpp"
5
6 #include <list>
7
8 namespace rubinius {
9 class VM;
6f92669 @dbussink Initial work to enable compiling with clang
dbussink authored
10 struct CallFrame;
07fc27b Hook up signal delivery
Evan Phoenix authored
11
e4c92f8 Rework how signals are delivered. Fixes #356
Evan Phoenix authored
12 class SignalHandler : public thread::Thread {
07fc27b Hook up signal delivery
Evan Phoenix authored
13 VM* vm_;
e4c92f8 Rework how signals are delivered. Fixes #356
Evan Phoenix authored
14 int pending_signals_[NSIG];
15 int running_signals_[NSIG];
16 int queued_signals_;
17 bool executing_signal_;
07fc27b Hook up signal delivery
Evan Phoenix authored
18 thread::SpinLock lock_;
e4c92f8 Rework how signals are delivered. Fixes #356
Evan Phoenix authored
19 int read_fd_;
20 int write_fd_;
e6bb96a Fix a number of IO/Signal interaction issues
Evan Phoenix authored
21
22 public:
23 SignalHandler(VM* vm);
e4c92f8 Rework how signals are delivered. Fixes #356
Evan Phoenix authored
24
25 void perform();
26
3e03dd6 Teach Signal.trap the rest of it's tricks. Fixes #314.
Evan Phoenix authored
27 void add_signal(int sig, bool def=false);
e6bb96a Fix a number of IO/Signal interaction issues
Evan Phoenix authored
28 void handle_signal(int sig);
29 static void signal_tramp(int sig);
30
31 void deliver_signals(CallFrame* call_frame);
e4c92f8 Rework how signals are delivered. Fixes #356
Evan Phoenix authored
32
33 static void on_fork();
07fc27b Hook up signal delivery
Evan Phoenix authored
34 };
35 }
36
37 #endif
Something went wrong with that request. Please try again.