1 // This file is written in D programming language 2 /** 3 * Copyright: © 2014 Anton Gushcha 4 * License: Subject to the terms of the MIT license, as written in the included LICENSE file. 5 * Authors: NCrashed <ncrashed@gmail.com> 6 */ 7 module test01; 8 9 import std.file; 10 11 import daemonize.d; 12 13 alias daemon = Daemon!( 14 "Test1", 15 16 KeyValueList!(), 17 18 (logger, shouldExit) { 19 write("output.txt", "Hello World!"); 20 return 0; 21 } 22 ); 23 24 int main() 25 { 26 return buildDaemon!daemon.run(new shared DloggLogger("logfile.log")); 27 }