Skip to content

Instantly share code, notes, and snippets.

@UtahDave
Created September 18, 2014 16:09
Show Gist options
  • Save UtahDave/ec8dcefed5756530c863 to your computer and use it in GitHub Desktop.
Save UtahDave/ec8dcefed5756530c863 to your computer and use it in GitHub Desktop.
Example of a Salt execution module that "fires and forgets" a command that may not ever return correctly.
from subprocess import Popen
def start_server():
cmd_str = 'coffee /tmp/app/app.coffee'
proc = Popen([cmd_str], shell=True,
stdin=None, stdout=None, stderr=None, close_fds=True)
return cmd_str
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment