I am porting an application which runs as a background service in windows at startup, we are porting the application to linux(SUSE Enterprise server), I’am completely new to linux. Can somebody help me on how to proceed with this. Like
- Should I build the linux executable
- After builiding the binary, what changes should I make to linux startup files to run this executable
- How my service can register call back function to modify or change or send commands to my service while it is running
Another task you are going to need to accomplish is to daemonize your application. Generally this is done by first fork()ing your process, then redirecting the stdin/stdout pipes in the child. There are more details which can be answered by reading this document