This is a simple article to setup a DNS Server in Ubuntu. Please follow the steps to make this. Setting up DNS Server is used to serve the new domain names using your IP. This is kind of providing webhosting.
Step1: We need to install bind 9 for this
sudo apt-get install bind9
Step 2: Configure the main Bind files. Usually, if you install Bind from the source code, you will have to edit the file named.conf. However, Ubuntu provides you with a [...]
Categories: Linux
Here’s some useful information for writing daemons in Python.
One common problem that people run into is os.fork() producing zombie processes when children quit. This can easily be overcome by setting the SIGCHLD signal to SIG_IGN. ie:
import signal
signal.signal(signal.SIGCHLD, signal.SIG_IGN)
On some flavors of Unix, you are forced to do a double-fork on startup, in order to go into daemon mode. This is because single forking isn’t guaranteed to detach from the controlling terminal. The solution is this:
import os, sys, time
# Main loop
def [...]
Categories: Python

