Having a strange issue I need assistance with, as I’m fairly new to linux… not sure what the issue is.
I’ve created a serviceApplication and have moved it over to Linux for testing. The ‘constructor’ method for ‘app’ runs, but the ‘Run’ event handler never executes. The application just closes at this point. When I switch the app to ‘consoleApplication’, it works fine; however, because I put a do/loop in the ‘Run’ event handler to keep the application from closing… it won’t work properly as a service. Any ideas what mistakes could keep the ‘Run’ event handler from executing when compiled as a serviceApplication on Linux?
From documentation: Used to create a Windows service application, which runs in the background without a user interface.
Maybe the documentation is not complete.
you will need to run your application from …/init.d :
Eric - don’t create it as a Service Application, but as a Console app. If you want to demonize the tool, use the Daemonize function.
And, John is correct, you will need to add your tool to your init environment. In addition to the init.d scripts, some distros provide a simpler method in the rc.local script.