sigusr.patch
uppsrc/Core/Diag.h (working copy) | ||
---|---|---|
19 | 19 |
Stream& VppLog(); |
20 | 20 |
void SetVppLog(Stream& log); |
21 | 21 | |
22 |
void ReopenLog(); |
|
23 | ||
22 | 24 |
void HexDump(Stream& s, const void *ptr, int size, int maxsize = INT_MAX); |
23 | 25 | |
24 | 26 |
void LogHex(const String& s); |
uppsrc/Skylark/App.cpp (working copy) | ||
---|---|---|
118 | 118 |
Broadcast(signal); |
119 | 119 |
exit(0); |
120 | 120 |
break; |
121 |
case SIGUSR1: |
|
122 |
Broadcast(signal); |
|
123 |
SigUsr1(); |
|
124 |
break; |
|
121 | 125 |
case SIGALRM: |
122 | 126 |
if(getpid() != TheApp().main_pid) { |
123 | 127 |
// "Timeout - session stoped" |
... | ... | |
188 | 192 |
SKYLARKLOG("Starting Skylark, current static path: " << path); |
189 | 193 | |
190 | 194 |
#ifdef PLATFORM_POSIX |
195 |
struct sigaction sa; |
|
196 |
memset(&sa, 0, sizeof(sa)); |
|
197 |
sa.sa_handler = SignalHandler; |
|
198 |
sigaction(SIGUSR1, &sa, NULL); |
|
191 | 199 |
if(prefork) { |
192 |
struct sigaction sa; |
|
193 |
memset(&sa, 0, sizeof(sa)); |
|
194 |
sa.sa_handler = SignalHandler; |
|
195 | 200 |
sigaction(SIGTERM, &sa, NULL); |
196 | 201 |
sigaction(SIGINT, &sa, NULL); |
197 | 202 |
sigaction(SIGHUP, &sa, NULL); |
uppsrc/Skylark/Skylark.h (working copy) | ||
---|---|---|
80 | 80 | |
81 | 81 |
virtual void WorkThread(); |
82 | 82 |
|
83 |
Callback SigUsr1; |
|
84 |
|
|
83 | 85 |
void RunThread(); |
84 | 86 | |
85 | 87 |
void Run(); |