blob: 254252b5cb035df29a889ba3c08d838e717cbb4f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
diff --git LiteEditor/app.cpp LiteEditor/app.cpp
index 2f966f68d..10aa6a32e 100644
--- LiteEditor/app.cpp
+++ LiteEditor/app.cpp
@@ -156,7 +156,9 @@ static void massCopy(const wxString& sourceDir, const wxString& spec, const wxSt
}
}
#ifndef __WXMSW__
-static void ChildTerminatedSingalHandler(int signo)
+namespace
+{
+void ChildTerminatedSingalHandler(int signo)
{
int status;
while(true) {
@@ -172,15 +174,22 @@ static void ChildTerminatedSingalHandler(int signo)
}
// Block/Restore sigchild
-static struct sigaction old_behvior;
-static struct sigaction new_behvior;
-static void CodeLiteBlockSigChild()
+struct sigaction old_behvior;
+struct sigaction new_behvior;
+void CodeLiteBlockSigChild()
{
sigfillset(&new_behvior.sa_mask);
new_behvior.sa_handler = ChildTerminatedSingalHandler;
new_behvior.sa_flags = 0;
sigaction(SIGCHLD, &new_behvior, &old_behvior);
}
+
+void on_sigpipe(int sig)
+{
+ clERROR() << "Received SIGPIPE!" << endl;
+ signal(SIGPIPE, on_sigpipe);
+}
+} // namespace
#endif
#ifdef __WXGTK__
@@ -238,14 +247,6 @@ IMPLEMENT_APP(CodeLiteApp)
#ifdef __WXMAC__
#define MENU_XRC "menu.macos.xrc"
-namespace
-{
-void on_sigpipe(int sig)
-{
- clERROR() << "Received SIGPIPE!" << endl;
- signal(SIGPIPE, on_sigpipe);
-}
-} // namespace
#else
#define MENU_XRC "menu.xrc"
#endif
|