I'd like to know how one would create an application that starts in the background. Im currently creating a Webserver in C as a little project, both to learn some old C and Linux Socket Programming. But my current concern is;
How do i get the current process number?
I want to get this because when i start the process, i want to display the process number for the user who starts the service.
My second problem is, how do i start my application as a Daemon to run in the background?
Any references, tutorials and/or videos on how I'd do this is appreciated!
Maybe i was a little bit unclear, i want to get the Process ID from within C. So, do i need to create a shellscript for my application or can i do this from C?