O'Reilly logo

Mastering Bash by Giorgio Zarrelli

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Going dark with the daemon

Do you think doing daemons is a complex task? Yes it is, unless you use a nice utility called daemon. The task of this program is to daemonize other commands or script in a simple and neat way. Does this utility take any shortcuts? No, it just goes through all the steps we have already seen to detach a process from the controlling terminal, putting it in background, starting a new session, clearing the umask, and closing the old file descriptors. Well, doing it by ourselves in Bash coding will be quite a difficult task. This program makes everything straightforward, nothing to take care of manually. But there is a drawback: this is not a standard utility and must be installed by the user. Not a big issue indeed ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required