Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > System > Networking

    nd 1.0

    Download button

    Downloads: 560  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Good (3.2/5)
    17 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Andrew Madigan | More programs
    GPL / FREE
    March 4th, 2008, 09:57 GMT
    ROOT / System / Networking

     Read user reviews (0)  Refer to a friend  Subscribe

    nd description

    nd is a small software that allows you to create simple network daemons.

    nd is a small software that allows you to create simple network daemons.

    Usage: ./nd -p port [OPTIONS]... command...

    Listen on a TCP port, executing a command with stdin and stdout redirecting to the incoming connection.

    Option Summary:

    -p port The port to run the server on.
    -a addr The address to ind the server to.
    -v Print additional output.
    -d Daemonize the server.
    -i Block SIGPIPE for child processes.
    -l logfile Redirect output to logfile.
    -x pidfile Write out the PID of the server to pidfile.
    -u user Run child processes as user.
    -U user After binding to the address, switch to user.
    -k Do not kill child processes when server is killed.
    -h Print this help.

    EXAMPLES

    A simple daemon can be created like this:

    $ nd -p 4000 echo hi

    With this running, whenever a client connects they will see the string ’hi’ printed, and then the connection will close.

    Daemonizing

    The following shows how to run nd as a daemon:

    $ nd -p 4000 -l log -x pid -d -v echo hi

    This will tell nd to daemonize itself. The pid of the daemon will be written to pid and the logging will be redirected to log. The -v parameter increases the verbosity slightly. With one -v parameter, the server startup sequence is logged and an additional log line is written when the server stops.

    Stopping nd

    nd can be stopped by sending either SIGINT or SIGTERM to the process. SIGINT is usually ^C at a terminal, whereas SIGTERM is the default sent by kill. Note that these will also stop any running child processes unless -k was passed to nd at startup.

    ENVIRONMENT

    The following environment variables are set for child processes.

    ND_PORT

    The remote port of the client

    ND_ADDR

    The remote address of the client

    ND_LISTEN_PORT

    The port nd is bound to

    ND_LISTEN_ADDR

    The address nd is bound to

    ND_VERBOSITY

    The number of -v parameters passed to nd

    What's New in This Release:

    · Many features were implemented.
    · IPv6 support is missing.



    Product's homepage

      


    TAGS:

    network daemon | incoming connection | daemonize server | network | daemon | TCP

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM