• Wincent
    Menu
  • Blog
  • Wiki
  • Snippets
  • Tags
  • Search

Running a shell script as a daemonEdit

Created 2015-09-14, updated 2017-05-18

The quick and dirty way:

$ (./script.sh &) &

Via: http://stackoverflow.com/a/3430969/2103996

Note: This "double-background" trick doesn't really daemonize the script, because it's not disconnecting standard in, standard out or standard error, nor is it making use of setsid to create a new process group.

  • shell
  • wiki
Site
  • About
  • Blog
  • Wiki
  • Snippets
  • Tags
  • Search
External
  • GitHub
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
Colophon

Made by Greg Hurrell with Rust (with help from Git and Neovim).