/[hydra]/hydra/src/loop_signals.h
ViewVC logotype

Contents of /hydra/src/loop_signals.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Mon Oct 21 18:46:26 2002 UTC (21 years, 5 months ago) by nmav
Branch: MAIN
CVS Tags: hydra_0_0_8, hydra_0_0_9, hydra_0_1_0, hydra_0_0_10
Branch point for: hydra_0_1_0_patches
File MIME type: text/plain
Added several stuff from Boa 0.94.14rc1

1
2 #ifdef ENABLE_SMP
3 extern pthread_t father_id;
4 #endif
5
6 inline static void handle_signals( server_params* params)
7 {
8
9 if (params->sigchld_flag)
10 sigchld_run();
11
12 #ifdef ENABLE_SMP
13 /* Only the main thread handles signals.
14 */
15 if (pthread_equal( params->tid, father_id)) {
16 #endif
17 /* Calculate current time. Moved here, so only one thread
18 * calls this.
19 */
20 time(&current_time);
21
22 if (params->sigalrm_flag)
23 sigalrm_run();
24 if (params->sigusr1_flag)
25 sigusr1_run();
26 if (params->sigterm_flag) {
27 if (params->sigterm_flag == 1) {
28 sigterm_stage1_run();
29 }
30 if (params->sigterm_flag == 2 && !params->request_ready && !params->request_block) {
31 sigterm_stage2_run();
32 }
33 params->server_s[0].pending_requests = 0;
34 params->server_s[1].pending_requests = 0;
35 }
36 #ifdef ENABLE_SMP
37 }
38 #endif
39
40 /* the whole family calls this
41 */
42 if (params->sighup_flag)
43 sighup_run();
44
45 }

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26