add new function get_proc_env - uses pargs or /proc to get env vars of processes
don't run remote session in background, if only 1 thread is allowed
[jboss] use get_proc_env for jboss_home detection