SHARE
TWEET

Become Session Leader

kevincox Nov 6th, 2012 55 Never
  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