ChipMaster's trial hacks on C++CMS starting with v1.2.1. Not sure I'll follow on with the v2 since it looks to be breaking and mostly frivolous.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

36 lines
900 B

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (C) 2008-2012 Artyom Beilis (Tonkikh) <artyomtnk@yahoo.com>
  4. //
  5. // See accompanying file COPYING.TXT file for licensing details.
  6. //
  7. ///////////////////////////////////////////////////////////////////////////////
  8. #ifndef CPPCMS_IMPL_DAEMONIZE_H
  9. #define CPPCMS_IMPL_DAEMONIZE_H
  10. #include <cppcms/defs.h>
  11. #include <string>
  12. namespace cppcms {
  13. namespace json { class value; }
  14. namespace impl {
  15. class CPPCMS_API daemonizer {
  16. public:
  17. daemonizer(json::value const &conf);
  18. ~daemonizer();
  19. static int global_urandom_fd;
  20. private:
  21. int real_pid;
  22. std::string unlink_file;
  23. void daemonize(json::value const &conf);
  24. void cleanup();
  25. };
  26. }
  27. }
  28. #endif