Red Hat Bugzilla – Bug 38848
exec hangs in .profile script for /bin/sh
Last modified: 2007-04-18 12:32:59 EDT
My .profile script hangs when it attempts to exec another shell. My
login shell is /bin/sh. You can reproduce this by creating an account
with /bin/sh as the login shell and then place an exec /bin/bash in
the .profile script.
This is the expected behavior - your inital shell executes .profile, which in
turn executes /bin/bash, which in turn executes .profile, and so on.
If you want to change your login shell, use chsh, not exec.