Since this is most easily done with a sequence of system commands, the normal and sane way to do this would be with a shell script, so there is no such API. Many linux daemons are (more and less...
Type: Posts; User: MK27
Since this is most easily done with a sequence of system commands, the normal and sane way to do this would be with a shell script, so there is no such API. Many linux daemons are (more and less...
It's true that if you background something from the command-line bash will complain if you try to exit before the background process finishes.
But bash behaves differently when it is executed as...
Good point. What you really need to do is create a new user (and maybe group) specifically for the daemon and attribute necessary filesystem resources to it.
That's why I prattled on about fork() in my previous post. As for the rest of the stuff, well, it looks like a pretty good article to me (altho all I did was skim it) -- you might want to try a more...
If redhat is still like fedora it uses the system I described. I've only looked at that and debian, so I'm kind of ignorant. In any case, the significant topic here is the runlevel which all...
fork() works on linux, and it will create a child process that runs "in the background" of your main process (and in that sense is "daemonized") but it will not cause the main process to background...