Bug 38848

Summary: exec hangs in .profile script for /bin/sh
Product: [Retired] Red Hat Linux Reporter: John Benninghoff <jbenninghoff>
Component: bashAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-05-02 21:24:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description John Benninghoff 2001-05-02 21:24:22 UTC
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.

Comment 1 Bernhard Rosenkraenzer 2001-05-03 15:40:57 UTC
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.