This is a pretty big change...  Forking after all the init processes
complete may not work.  Are you certain this introduces no hard to
detect regression?  For example, totemudp creates threads when wthread
is set...

regards
-steve

On Fri, 2009-08-07 at 13:20 +0200, Fabio M. Di Nitto wrote:
> Detach tty as late as possible to give a chance to corosync startup
> wrappers (cman and possibly others) to collect as much output
> as possible from stderr in case of errors.
> 
> Signed-off-by: Fabio M. Di Nitto <[email protected]>
> ---
> :100644 100644 edaa69f... 3aa52df... M        exec/main.c
>  exec/main.c |   12 ++++++++----
>  1 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/exec/main.c b/exec/main.c
> index edaa69f..3aa52df 100644
> --- a/exec/main.c
> +++ b/exec/main.c
> @@ -770,9 +770,6 @@ int main (int argc, char **argv)
>               }
>       }
>  
> -     if (background)
> -             corosync_tty_detach ();
> -
>       /*
>        * Set round robin realtime scheduling with priority 99
>        * Lock all memory to avoid page faults which may interrupt
> @@ -886,7 +883,6 @@ int main (int argc, char **argv)
>               syslog (LOGSYS_LEVEL_ERROR, "%s", error_string);
>               corosync_exit_error (AIS_DONE_MAINCONFIGREAD);
>       }
> -     logsys_fork_completed();
>  
>       /*
>        * Make sure required directory is present
> @@ -1035,6 +1031,14 @@ int main (int argc, char **argv)
>       coroipcs_ipc_init (&ipc_init_state);
>  
>       /*
> +      * Now we are fully initialized
> +      */
> +     if (background) {
> +             corosync_tty_detach ();
> +     }
> +     logsys_fork_completed();
> +
> +     /*
>        * Start main processing loop
>        */
>       poll_run (corosync_poll_handle);

_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to