What are synchronous daemons?

This is a discussion on What are synchronous daemons? within the Linux Programming forums, part of the Platform Specific Boards category; Just curious. What are synchronous daemons and why would someone use them as opposed to asynchronous daemons....

  1. #1
    Banned
    Join Date
    May 2007
    Location
    Berkeley, CA
    Posts
    329

    What are synchronous daemons?

    Just curious. What are synchronous daemons and why would someone use them as opposed to asynchronous daemons.

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    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?
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Banned
    Join Date
    May 2007
    Location
    Berkeley, CA
    Posts
    329
    And I quote from the following url

    http://homepages.tesco.net/~J.deBoyn...-to-avoid.html

    "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."

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    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
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    Banned
    Join Date
    May 2007
    Location
    Berkeley, CA
    Posts
    329
    Okay, that makes sense.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. asynchronous and synchronous call between apartments
    By George2 in forum Windows Programming
    Replies: 0
    Last Post: 04-05-2008, 01:22 AM
  2. synchronous function
    By akrlot in forum C Programming
    Replies: 1
    Last Post: 09-28-2007, 03:06 AM
  3. ftp daemons..
    By ober in forum Linux Programming
    Replies: 2
    Last Post: 09-27-2001, 01:06 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21