@@ -262,9 +262,6 @@ int master = 0; /* 1 if in master, 0 if in child */
262262/* per-boot randomness */
263263unsigned char boot_seed [20 ]; /* per-boot random seed (160 bits initially) */
264264
265- /* takes the thread config in argument or NULL for any thread */
266- static void * run_thread_poll_loop (void * data );
267-
268265/* bitfield of a few warnings to emit just once (WARN_*) */
269266unsigned int warned = 0 ;
270267
@@ -878,42 +875,6 @@ void mworker_reload(int hardreload)
878875 mworker_reexec (hardreload );
879876}
880877
881- static void mworker_loop ()
882- {
883-
884- /* Busy polling makes no sense in the master :-) */
885- global .tune .options &= ~GTUNE_BUSY_POLLING ;
886-
887-
888- signal_unregister (SIGTTIN );
889- signal_unregister (SIGTTOU );
890- signal_unregister (SIGUSR1 );
891- signal_unregister (SIGHUP );
892- signal_unregister (SIGQUIT );
893-
894- signal_register_fct (SIGTERM , mworker_catch_sigterm , SIGTERM );
895- signal_register_fct (SIGUSR1 , mworker_catch_sigterm , SIGUSR1 );
896- signal_register_fct (SIGTTIN , mworker_broadcast_signal , SIGTTIN );
897- signal_register_fct (SIGTTOU , mworker_broadcast_signal , SIGTTOU );
898- signal_register_fct (SIGINT , mworker_catch_sigterm , SIGINT );
899- signal_register_fct (SIGHUP , mworker_catch_sighup , SIGHUP );
900- signal_register_fct (SIGUSR2 , mworker_catch_sighup , SIGUSR2 );
901- signal_register_fct (SIGCHLD , mworker_catch_sigchld , SIGCHLD );
902-
903- mworker_unblock_signals ();
904- mworker_cleantasks ();
905-
906- mworker_catch_sigchld (NULL ); /* ensure we clean the children in case
907- some SIGCHLD were lost */
908-
909- jobs ++ ; /* this is the "master" job, we want to take care of the
910- signals even if there is no listener so the poll loop don't
911- leave */
912-
913- fork_poller ();
914- run_thread_poll_loop (NULL );
915- }
916-
917878/*
918879 * Exit with an error message upon a master recovery mode failure.
919880 */
@@ -1960,37 +1921,6 @@ static void generate_random_cluster_secret()
19601921 cluster_secret_isset = 1 ;
19611922}
19621923
1963- static void mworker_run_master ()
1964- {
1965- struct mworker_proc * child , * it ;
1966-
1967- proc_self -> failedreloads = 0 ; /* reset the number of failure */
1968- mworker_loop ();
1969- #if defined(USE_OPENSSL ) && !defined(OPENSSL_NO_DH )
1970- ssl_free_dh ();
1971- #endif
1972- master = 0 ;
1973- /* close useless master sockets */
1974- mworker_cli_proxy_stop ();
1975-
1976- /* free proc struct of other processes */
1977- list_for_each_entry_safe (child , it , & proc_list , list ) {
1978- /* close the FD of the master side for all
1979- * workers, we don't need to close the worker
1980- * side of other workers since it's done with
1981- * the bind_proc */
1982- if (child -> ipc_fd [0 ] >= 0 ) {
1983- close (child -> ipc_fd [0 ]);
1984- child -> ipc_fd [0 ] = -1 ;
1985- }
1986- LIST_DELETE (& child -> list );
1987- mworker_free_child (child );
1988- child = NULL ;
1989- }
1990- /* master must leave */
1991- exit (0 );
1992- }
1993-
19941924/*
19951925 * This function does daemonization fork. It only returns if everything is OK.
19961926 * If something fails, it exits.
@@ -3405,7 +3335,7 @@ void run_poll_loop()
34053335 _HA_ATOMIC_AND (& th_ctx -> flags , ~TH_FL_IN_LOOP );
34063336}
34073337
3408- static void * run_thread_poll_loop (void * data )
3338+ void * run_thread_poll_loop (void * data )
34093339{
34103340 struct per_thread_alloc_fct * ptaf ;
34113341 struct per_thread_init_fct * ptif ;
0 commit comments