Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 42 lines (31 sloc) 0.752 kB
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_;
5a2ce08 Shutdown the signal handler thread before exec'ing
Evan Phoenix authored
21 bool exit_;
e6bb96a Fix a number of IO/Signal interaction issues
Evan Phoenix authored
22
23 public:
24 SignalHandler(VM* vm);
e4c92f8 Rework how signals are delivered. Fixes #356
Evan Phoenix authored
25
26 void perform();
27
3e03dd6 Teach Signal.trap the rest of it's tricks. Fixes #314.
Evan Phoenix authored
28 void add_signal(int sig, bool def=false);
e6bb96a Fix a number of IO/Signal interaction issues
Evan Phoenix authored
29 void handle_signal(int sig);
30 static void signal_tramp(int sig);
31
32 void deliver_signals(CallFrame* call_frame);
e4c92f8 Rework how signals are delivered. Fixes #356
Evan Phoenix authored
33
ad006cb Fix ugly signal bug related to pipe fds.
Evan Phoenix authored
34 void reopen_pipes();
e4c92f8 Rework how signals are delivered. Fixes #356
Evan Phoenix authored
35 static void on_fork();
5a2ce08 Shutdown the signal handler thread before exec'ing
Evan Phoenix authored
36 static void shutdown();
37 void shutdown_i();
07fc27b Hook up signal delivery
Evan Phoenix authored
38 };
39 }
40
41 #endif
Something went wrong with that request. Please try again.