SHARE
TWEET

Become Session Leader

kevincox Nov 6th, 2012 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if [ $(ps -o sess= --pid $$) -ne $$ ]; then # If we are not the session leader...
  2.         exec setsid "$0" "$@"               # Become it.
  3. fi
RAW Paste Data
Top