Skip to content

Instantly share code, notes, and snippets.

Created June 1, 2017 20:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/31e8340d32923f5f32b73a76319de144 to your computer and use it in GitHub Desktop.
Save anonymous/31e8340d32923f5f32b73a76319de144 to your computer and use it in GitHub Desktop.
# cat nohuptest.sh
#!/bin/bash
echo $(date)
sleep 10
echo $(date)
# salt 'c6minion' cmd.shell '( ( ./nohuptest.sh > out ) & disown )'
[ On system in question ]
root 14795 1 0 15:36 ? 00:00:00 /usr/bin/python2.6 /usr/bin/salt-minion -d
root 14796 14795 0 15:36 ? 00:00:00 [sh] <defunct>
root 14798 1 0 15:36 ? 00:00:00 /bin/bash ./nohuptest.sh
root 14800 14798 0 15:36 ? 00:00:00 sleep 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment