Rev 1947 | Rev 1959 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1947 | Rev 1956 | ||
|---|---|---|---|
| Line 17... | Line 17... | ||
| 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 18 | * |
18 | * |
| 19 | */ |
19 | */ |
| 20 | 20 | ||
| 21 | #include <signal.h> |
21 | #include <signal.h> |
| - | 22 | #include <sys/resource.h> |
|
| 22 | 23 | ||
| 23 | #include <boost/program_options.hpp> |
24 | #include <boost/program_options.hpp> |
| 24 | #include <boost/thread/mutex.hpp> |
25 | #include <boost/thread/mutex.hpp> |
| 25 | #include <boost/thread/condition.hpp> |
26 | #include <boost/thread/condition.hpp> |
| 26 | #include <boost/thread/locks.hpp> |
27 | #include <boost/thread/locks.hpp> |
| Line 67... | Line 68... | ||
| 67 | void Handler(int status); |
68 | void Handler(int status); |
| 68 | void CleanUp(); |
69 | void CleanUp(); |
| 69 | 70 | ||
| 70 | int main(int argc, char **argv) |
71 | int main(int argc, char **argv) |
| 71 | { |
72 | { |
| - | 73 | rlimit core_limit = { RLIM_INFINITY, RLIM_INFINITY }; |
|
| - | 74 | setrlimit( RLIMIT_CORE, &core_limit ); // enable core dumps |
|
| - | 75 | ||
| - | 76 | ||
| 72 | LOG.Info("\033[29;1mAtom Daemon, version " + std::string(VERSION) + " starting...\033[0m"); |
77 | LOG.Info("\033[29;1mAtom Daemon, version " + std::string(VERSION) + " starting...\033[0m"); |
| 73 | LOG.Info("\033[29;1mReleased under " + std::string(LICENSE) + ".\033[0m"); |
78 | LOG.Info("\033[29;1mReleased under " + std::string(LICENSE) + ".\033[0m"); |
| 74 | LOG.Info("Written by Mattias Runge 2010-2012."); |
79 | LOG.Info("Written by Mattias Runge 2010-2012."); |
| 75 | 80 | ||
| 76 | signal(SIGTERM, Handler); |
81 | signal(SIGTERM, Handler); |