diff options
| author | Gavin Andresen <[email protected]> | 2010-09-09 14:26:53 -0400 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2010-09-09 14:26:53 -0400 |
| commit | 90e165aa0c702a7efcbfc1e452e7f82dbd8411d0 (patch) | |
| tree | 4a629be51e005a33f1547eecd04e0ea88cababa2 /init.cpp | |
| parent | Merge remote branch 'refs/remotes/svn/trunk' into svn (diff) | |
| parent | try to auto-detect whether to use 128-bit 4-way SSE2 (diff) | |
| download | discoin-90e165aa0c702a7efcbfc1e452e7f82dbd8411d0.tar.xz discoin-90e165aa0c702a7efcbfc1e452e7f82dbd8411d0.zip | |
Merge remote branch 'refs/remotes/svn/trunk' into svn
Diffstat (limited to 'init.cpp')
| -rw-r--r-- | init.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -10,7 +10,6 @@ - ////////////////////////////////////////////////////////////////////////////// // // Shutdown @@ -57,6 +56,11 @@ void Shutdown(void* parg) } } +void HandleSIGTERM(int) +{ + fRequestShutdown = true; +} + @@ -130,6 +134,14 @@ bool AppInit2(int argc, char* argv[]) #ifndef __WXMSW__ umask(077); #endif +#ifndef __WXMSW__ + // Clean shutdown on SIGTERM + struct sigaction sa; + sa.sa_handler = HandleSIGTERM; + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; + sigaction(SIGTERM, &sa, NULL); +#endif // // Parameters |