From: | "Benedikt Boehm (hollow)" <hollow@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in www-apache/mod_fastcgi/files: 2.4.6-graceful.patch |
Date: | Sun, 01 Jun 2008 12:20:25 |
Message-Id: | E1K2mXX-0008By-Dg@stork.gentoo.org |
1 | hollow 08/06/01 12:19:59 |
2 | |
3 | Added: 2.4.6-graceful.patch |
4 | Log: |
5 | fix graceful restart wrt #222059 |
6 | (Portage version: 2.1.5.2) |
7 | |
8 | Revision Changes Path |
9 | 1.1 www-apache/mod_fastcgi/files/2.4.6-graceful.patch |
10 | |
11 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-apache/mod_fastcgi/files/2.4.6-graceful.patch?rev=1.1&view=markup |
12 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-apache/mod_fastcgi/files/2.4.6-graceful.patch?rev=1.1&content-type=text/plain |
13 | |
14 | Index: 2.4.6-graceful.patch |
15 | =================================================================== |
16 | --- fcgi_pm.c.orig 2008-04-04 09:34:20.000000000 +0200 |
17 | +++ fcgi_pm.c 2008-04-04 09:37:58.000000000 +0200 |
18 | @@ -128,8 +128,26 @@ |
19 | int numChildren = (s->directive == APP_CLASS_DYNAMIC) |
20 | ? dynamicMaxClassProcs |
21 | : s->numProcesses; |
22 | + |
23 | + /* Send TERM to all processes */ |
24 | + for (i = 0; i < numChildren; i++, proc++) |
25 | + { |
26 | + if (proc->state == FCGI_RUNNING_STATE) |
27 | + { |
28 | + fcgi_kill(proc, SIGTERM); |
29 | + } |
30 | + } |
31 | |
32 | + s = s->next; |
33 | + } |
34 | + |
35 | #ifndef WIN32 |
36 | + /* sleep two seconds to let the children terminate themselves */ |
37 | + sleep(2); |
38 | + s = fcgi_servers; |
39 | + |
40 | + while (s) |
41 | + { |
42 | if (s->socket_path != NULL && s->directive != APP_CLASS_EXTERNAL) |
43 | { |
44 | /* Remove the socket file */ |
45 | @@ -140,19 +158,9 @@ |
46 | (s->directive == APP_CLASS_DYNAMIC) ? " (dynamic)" : "", s->fs_path); |
47 | } |
48 | } |
49 | -#endif |
50 | - |
51 | - /* Send TERM to all processes */ |
52 | - for (i = 0; i < numChildren; i++, proc++) |
53 | - { |
54 | - if (proc->state == FCGI_RUNNING_STATE) |
55 | - { |
56 | - fcgi_kill(proc, SIGTERM); |
57 | - } |
58 | - } |
59 | - |
60 | s = s->next; |
61 | } |
62 | +#endif |
63 | |
64 | #if defined(WIN32) && (WIN32_SHUTDOWN_GRACEFUL_WAIT > 0) |
65 | |
66 | |
67 | |
68 | |
69 | -- |
70 | gentoo-commits@l.g.o mailing list |