Hi,

I'm not sure that this will work correctly, have you been
using it on a MMU-less system? After the vfork() it doesn't
execve(), so it will be sharing a lot of memory state with
parent process (which also needs to keep running). For
uclinux systems I think people have usually been using inetd
mode, which doesn't use that code path.

Cheers,
Matt


On Thu, Apr 05, 2012 at 10:50:45AM -0300, Gustavo Zacarias wrote:
> 
> Fix the last lingering fork() call for uClinux (nommu) systems.

> Get rid of the last lingering fork() for nommu systems.
> 
> Signed-off-by: Gustavo Zacarias <[email protected]>
> 
> diff -Nura dropbear-2012.55/svr-main.c dropbear-2012.55-nommu/svr-main.c
> --- dropbear-2012.55/svr-main.c       2012-02-23 10:47:06.000000000 -0300
> +++ dropbear-2012.55-nommu/svr-main.c 2012-04-05 10:46:19.639718670 -0300
> @@ -262,7 +262,11 @@
>  #ifdef DEBUG_NOFORK
>                       fork_ret = 0;
>  #else
> +# ifdef __uClinux__
> +                     fork_ret = vfork();
> +# else
>                       fork_ret = fork();
> +# endif
>  #endif
>                       if (fork_ret < 0) {
>                               dropbear_log(LOG_WARNING, "Error forking: %s", 
> strerror(errno));

Reply via email to