Re: Forking as another user

2016-03-12 Thread Lars Noodén
Thanks, David and Shlomi (and those that read), I understand fork() and the style of writing better. Strange that the defaults for 'use English' are not optimal. The snippet below works to fork as a specific user, if run as root. However, it generates zombies. The functions wait() or waitpid()

Re: Forking as another user

2016-03-12 Thread Shlomi Fish
Hi Lars, some comments on your code: On Fri, 11 Mar 2016 20:22:34 +0200 Lars Noodén wrote: > If I have the code below to fork a child process, how would the right > way be to fork as a different user? I gather that fork() itself does > not support that, so some other method must be used. > >