Skip to content

Commit 2a5b73b

Browse files
update timing of calling signal handler
1 parent 2d79df5 commit 2a5b73b

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/turingcoroutine.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
struct TUringTask;
3+
class TUringTask;
44

55

66
class TUringCoroutine {

src/twebapplication_unix.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void TWebApplication::watchUnixSignal(int sig, bool watch)
3434
sa.sa_handler = SIG_DFL;
3535
}
3636

37-
if (sigaction(sig, &sa, 0) != 0) {
37+
if (::sigaction(sig, &sa, 0) != 0) {
3838
tSystemError("sigaction failed errno:{}", errno);
3939
}
4040
}

tools/tfserver/main.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,12 @@ int main(int argc, char *argv[])
208208
bool showRoutesOption = args.contains(SHOW_ROUTES_OPTION);
209209
ushort portNumber = args.value(PORT_OPTION).toUShort();
210210

211+
#if defined(Q_OS_UNIX) || !defined(TF_NO_DEBUG)
212+
// Setup signal handlers for SIGSEGV, SIGILL, SIGFPE, SIGABRT and SIGBUS
213+
google::InstallFailureWriter(writeFailure);
214+
google::InstallFailureSignalHandler();
215+
#endif
216+
211217
#ifdef Q_OS_UNIX
212218
webapp.watchUnixSignal(SIGTERM);
213219
if (!debug) {
@@ -219,12 +225,6 @@ int main(int argc, char *argv[])
219225
}
220226
#endif
221227

222-
#if defined(Q_OS_UNIX) || !defined(TF_NO_DEBUG)
223-
// Setup signal handlers for SIGSEGV, SIGILL, SIGFPE, SIGABRT and SIGBUS
224-
google::InstallFailureWriter(writeFailure);
225-
google::InstallFailureSignalHandler();
226-
#endif
227-
228228
// Sets the app locale
229229
QString loc = Tf::appSettings()->value(Tf::Locale).toString().trimmed();
230230
if (!loc.isEmpty()) {

0 commit comments

Comments
 (0)