title: Load user environment when executing process with execvp();
body: <p>i have a daemon running which might spawn a Process on incomming connections. This is done using <code>execvp()</code> and <code>fork()</code>.</p>
  
  <p>The Problem is that the process should not run as root and the process is dependend on a correct user environment. So im seeking a way to load the user environment.</p>
  
  <p>Currently the process is executed as another user by setting gid and uid. What i have already tried is using as command <code>su -l user -c command</code>, which did not work for some reason.</p>
  
  <p>Does somebody have an idea how i can load the user environment (especially the <code>$HOME</code> variable)?</p>
  
  <p>Thanks in advance.</p>