title: Trying to learn the BASH Shell source code,but stuck with environment variables loading
body: <p>I was curious about how the famous Bourne shell is written.So I started digging into the source code.I understand that,One of the initial things which bash does is it loads the ~/.bash_profile file for the user env.
  My question is how it loads the environment variables in the current shell.</p>
  
  <ol>
  <li>Does it fork and execute it?</li>
  <li>Does it read the bash_profile file and does putenv(),one for each
  variable?</li>
  </ol>
  
  <p>In the source code <code>bash-2.0/shell.c</code>, I found a function call like,</p>
  
  <p><code>maybe_execute_file ("~/.bash_profile", 1);</code></p>
  
  <p>Even after digging further I was unable to get the exact logic as of how the values are pushed in environment.</p>