Just curious. What are synchronous daemons and why would someone use them as opposed to asynchronous daemons.
Printable View
Just curious. What are synchronous daemons and why would someone use them as opposed to asynchronous daemons.
These terms do not seem to have a generally accepted definition. I can find some mentions in the context of distributed systems, but nothing that talks about the general Nix daemon.
What's your context?
And I quote from the following url
http://homepages.tesco.net/~J.deBoyn...-to-avoid.html
Quote:
"If some novice system administrator, running your dæmon from an /etc/rc.d or /etc/rc.* script (rather than from init or under the aegis of daemontools, runit, upstart, the SAC, the SMF, or the SRC) then asks you how to persuade your dæmon to run asynchronously so that the script does not wait for it to finish, point them in the direction of the documentation for the shell's '&' metacharacter."
In this case, it's all about running a PROCESS asynchronously in regard to the creating process - so, when you start a new daemon, the script that creates this daemon doesn't have to wait for the daemon to disconnect itself from originating process.
I agree there is no such concept as a general rule, and whilst the comments are on daemons, it's not really related to the actual daemon, but to the script process that starts the daemon.
So, for example, if we do:
# daemon &
or
# daemon
on a shell line will most likely give the same result, but in the first case, any initialization and such of the daemon will happen in the background, and the shell will be free to continue doing other operations almost immediately, rather than waiting for the daemon to "deamonize itself".
--
Mats
Okay, that makes sense.