FANDOM


inetd, the super internet daemon, provides a easier way to launch servers. It also helps ease programming, since it feeds any data received to stdin and sends data in stdout of the server, thus making it easier to progam.

Example ServerEdit

This is an example for a server using inetd:

#include <stdio.h>
int main(int argc, char *argv[]) {
 while(1) {
  if (getchar()) {
   printf("Hello World!\n");
  }
 }
}

This server reads anything from stdin (input of client/input of inetd) and sends the message "Hello World!" to the client (stdout of server/output of inetd). It loops using a while statement, to keep the server running.

DisablingEdit

Change:

INETD=yes

to read:

INETD=no

in /etc/rc.conf. Now, you can reboot, or kill inetd:

kill `cat /var/run/inetd.pid`
rm /var/run/inetd.pid

ConfigEdit

You can modify /etc/inetd.conf to configure inetd.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.