Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Switching shell safely and efficiently



On Sep 7,  7:35pm, Adam Spiers wrote:
} 
} Using exec is preferable, to avoid leaving loads of copies of bash
} lying around in the process table doing nothing, but for me, the exec
} has been known to fail (despite a -x check succeeding) due to library
} mismatches between our various machines in the office. So I wanted
} something that hit the sweet spot in the safety/efficiency trade-off

    run_shell=`$myshell -c "echo exec $myshell" || echo :`
    eval $run_shell '"$@"'

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



Messages sorted by: Reverse Date, Date, Thread, Author