Python function emulating Linux Daemon(3).