From: Robert L. <bob...@gm...> - 2012-11-11 19:56:50
|
Hello all, I'd like to know if it is at all possible to write UNIX-like daemons in a MinGW (non-MSYS) environment. Of course I could just go ahead and try to cook something that fork()s off and does its thing in the background, but I'd like to know if it works on Windows just as on Linux. On startup, the program must check if another instance is already running, and must abort. Alternatively, when called a second time with a command-line option, it must cause the existing process to cleanly terminate. Since all the program does is a periodic consistency check of a bunch of files once a minute, writing out the result in another file, it is trivial to just have a batch file call the program in an infinite loop. This is what I'll do for the first testing version. Eventually I would like the thing to run invisibly in the background without littering the task bar with nonsensical command windows though. Thanks, robert |