preplay_unicorn 4.3.1.2.gc450

Sign up to get free protection for your applications and to get access to all the features.
Files changed (259) hide show
  1. data/.CHANGELOG.old +25 -0
  2. data/.document +29 -0
  3. data/.gitignore +24 -0
  4. data/.mailmap +26 -0
  5. data/.manifest +258 -0
  6. data/.wrongdoc.yml +10 -0
  7. data/Application_Timeouts +77 -0
  8. data/CONTRIBUTORS +35 -0
  9. data/COPYING +674 -0
  10. data/ChangeLog +3839 -0
  11. data/DESIGN +97 -0
  12. data/Documentation/.gitignore +5 -0
  13. data/Documentation/GNUmakefile +30 -0
  14. data/Documentation/unicorn.1.txt +174 -0
  15. data/Documentation/unicorn_rails.1.txt +175 -0
  16. data/FAQ +53 -0
  17. data/GIT-VERSION-FILE +1 -0
  18. data/GIT-VERSION-GEN +40 -0
  19. data/GNUmakefile +294 -0
  20. data/HACKING +134 -0
  21. data/ISSUES +36 -0
  22. data/KNOWN_ISSUES +79 -0
  23. data/LATEST +15 -0
  24. data/LICENSE +64 -0
  25. data/Links +56 -0
  26. data/NEWS +1886 -0
  27. data/PHILOSOPHY +145 -0
  28. data/README +149 -0
  29. data/Rakefile +97 -0
  30. data/SIGNALS +114 -0
  31. data/Sandbox +96 -0
  32. data/TODO +5 -0
  33. data/TUNING +98 -0
  34. data/bin/unicorn +121 -0
  35. data/bin/unicorn_rails +209 -0
  36. data/examples/big_app_gc.rb +2 -0
  37. data/examples/echo.ru +27 -0
  38. data/examples/git.ru +13 -0
  39. data/examples/init.sh +74 -0
  40. data/examples/logger_mp_safe.rb +25 -0
  41. data/examples/logrotate.conf +29 -0
  42. data/examples/nginx.conf +156 -0
  43. data/examples/unicorn.conf.minimal.rb +13 -0
  44. data/examples/unicorn.conf.rb +94 -0
  45. data/ext/unicorn_http/CFLAGS +13 -0
  46. data/ext/unicorn_http/c_util.h +124 -0
  47. data/ext/unicorn_http/common_field_optimization.h +111 -0
  48. data/ext/unicorn_http/ext_help.h +86 -0
  49. data/ext/unicorn_http/extconf.rb +10 -0
  50. data/ext/unicorn_http/global_variables.h +97 -0
  51. data/ext/unicorn_http/httpdate.c +82 -0
  52. data/ext/unicorn_http/unicorn_http.c +4031 -0
  53. data/ext/unicorn_http/unicorn_http.rl +1036 -0
  54. data/ext/unicorn_http/unicorn_http_common.rl +76 -0
  55. data/lib/unicorn/app/exec_cgi.rb +154 -0
  56. data/lib/unicorn/app/inetd.rb +109 -0
  57. data/lib/unicorn/app/old_rails/static.rb +59 -0
  58. data/lib/unicorn/app/old_rails.rb +35 -0
  59. data/lib/unicorn/cgi_wrapper.rb +147 -0
  60. data/lib/unicorn/configurator.rb +641 -0
  61. data/lib/unicorn/const.rb +40 -0
  62. data/lib/unicorn/http_request.rb +77 -0
  63. data/lib/unicorn/http_response.rb +45 -0
  64. data/lib/unicorn/http_server.rb +748 -0
  65. data/lib/unicorn/launcher.rb +62 -0
  66. data/lib/unicorn/oob_gc.rb +71 -0
  67. data/lib/unicorn/preread_input.rb +33 -0
  68. data/lib/unicorn/socket_helper.rb +208 -0
  69. data/lib/unicorn/ssl_client.rb +11 -0
  70. data/lib/unicorn/ssl_configurator.rb +104 -0
  71. data/lib/unicorn/ssl_server.rb +42 -0
  72. data/lib/unicorn/stream_input.rb +149 -0
  73. data/lib/unicorn/tee_input.rb +126 -0
  74. data/lib/unicorn/tmpio.rb +29 -0
  75. data/lib/unicorn/util.rb +68 -0
  76. data/lib/unicorn/worker.rb +88 -0
  77. data/lib/unicorn.rb +107 -0
  78. data/local.mk.sample +59 -0
  79. data/man/man1/unicorn.1 +201 -0
  80. data/man/man1/unicorn_rails.1 +208 -0
  81. data/preplay_unicorn.gemspec +44 -0
  82. data/script/isolate_for_tests +50 -0
  83. data/setup.rb +1586 -0
  84. data/t/.gitignore +5 -0
  85. data/t/GNUmakefile +82 -0
  86. data/t/README +42 -0
  87. data/t/bin/content-md5-put +36 -0
  88. data/t/bin/sha1sum.rb +17 -0
  89. data/t/bin/unused_listen +40 -0
  90. data/t/bin/utee +12 -0
  91. data/t/broken-app.ru +12 -0
  92. data/t/detach.ru +11 -0
  93. data/t/env.ru +3 -0
  94. data/t/heartbeat-timeout.ru +12 -0
  95. data/t/my-tap-lib.sh +201 -0
  96. data/t/oob_gc.ru +21 -0
  97. data/t/oob_gc_path.ru +21 -0
  98. data/t/pid.ru +3 -0
  99. data/t/preread_input.ru +17 -0
  100. data/t/rack-input-tests.ru +21 -0
  101. data/t/rails3-app/.gitignore +4 -0
  102. data/t/rails3-app/Gemfile +26 -0
  103. data/t/rails3-app/Rakefile +10 -0
  104. data/t/rails3-app/app/controllers/application_controller.rb +4 -0
  105. data/t/rails3-app/app/helpers/application_helper.rb +2 -0
  106. data/t/rails3-app/app/views/layouts/application.html.erb +14 -0
  107. data/t/rails3-app/config/application.rb +46 -0
  108. data/t/rails3-app/config/boot.rb +6 -0
  109. data/t/rails3-app/config/database.yml +22 -0
  110. data/t/rails3-app/config/environment.rb +5 -0
  111. data/t/rails3-app/config/environments/development.rb +19 -0
  112. data/t/rails3-app/config/environments/production.rb +42 -0
  113. data/t/rails3-app/config/environments/test.rb +32 -0
  114. data/t/rails3-app/config/initializers/backtrace_silencers.rb +7 -0
  115. data/t/rails3-app/config/initializers/inflections.rb +10 -0
  116. data/t/rails3-app/config/initializers/mime_types.rb +5 -0
  117. data/t/rails3-app/config/initializers/secret_token.rb +7 -0
  118. data/t/rails3-app/config/initializers/session_store.rb +8 -0
  119. data/t/rails3-app/config/locales/en.yml +5 -0
  120. data/t/rails3-app/config/routes.rb +58 -0
  121. data/t/rails3-app/config.ru +4 -0
  122. data/t/rails3-app/db/seeds.rb +7 -0
  123. data/t/rails3-app/doc/README_FOR_APP +2 -0
  124. data/t/rails3-app/lib/tasks/.gitkeep +0 -0
  125. data/t/rails3-app/public/404.html +1 -0
  126. data/t/rails3-app/public/500.html +1 -0
  127. data/t/rails3-app/public/x.txt +1 -0
  128. data/t/rails3-app/script/rails +9 -0
  129. data/t/rails3-app/test/performance/browsing_test.rb +9 -0
  130. data/t/rails3-app/test/test_helper.rb +13 -0
  131. data/t/rails3-app/vendor/plugins/.gitkeep +0 -0
  132. data/t/sslgen.sh +71 -0
  133. data/t/t0000-http-basic.sh +50 -0
  134. data/t/t0001-reload-bad-config.sh +53 -0
  135. data/t/t0002-config-conflict.sh +49 -0
  136. data/t/t0002-parser-error.sh +94 -0
  137. data/t/t0003-working_directory.sh +51 -0
  138. data/t/t0004-heartbeat-timeout.sh +69 -0
  139. data/t/t0004-working_directory_broken.sh +24 -0
  140. data/t/t0005-working_directory_app.rb.sh +37 -0
  141. data/t/t0006-reopen-logs.sh +83 -0
  142. data/t/t0006.ru +13 -0
  143. data/t/t0007-working_directory_no_embed_cli.sh +44 -0
  144. data/t/t0008-back_out_of_upgrade.sh +110 -0
  145. data/t/t0009-broken-app.sh +56 -0
  146. data/t/t0009-winch_ttin.sh +59 -0
  147. data/t/t0010-reap-logging.sh +55 -0
  148. data/t/t0011-active-unix-socket.sh +79 -0
  149. data/t/t0012-reload-empty-config.sh +85 -0
  150. data/t/t0013-rewindable-input-false.sh +24 -0
  151. data/t/t0013.ru +12 -0
  152. data/t/t0014-rewindable-input-true.sh +24 -0
  153. data/t/t0014.ru +12 -0
  154. data/t/t0015-configurator-internals.sh +25 -0
  155. data/t/t0016-trust-x-forwarded-false.sh +30 -0
  156. data/t/t0017-trust-x-forwarded-true.sh +30 -0
  157. data/t/t0018-write-on-close.sh +23 -0
  158. data/t/t0019-max_header_len.sh +49 -0
  159. data/t/t0020-at_exit-handler.sh +49 -0
  160. data/t/t0021-process_detach.sh +29 -0
  161. data/t/t0100-rack-input-tests.sh +124 -0
  162. data/t/t0116-client_body_buffer_size.sh +80 -0
  163. data/t/t0116.ru +16 -0
  164. data/t/t0300-rails3-basic.sh +28 -0
  165. data/t/t0301-rails3-missing-config-ru.sh +33 -0
  166. data/t/t0302-rails3-alt-working_directory.sh +32 -0
  167. data/t/t0303-rails3-alt-working_directory_config.ru.sh +56 -0
  168. data/t/t0304-rails3-alt-working_directory_no_embed_cli.sh +52 -0
  169. data/t/t0600-https-server-basic.sh +48 -0
  170. data/t/t9000-preread-input.sh +48 -0
  171. data/t/t9001-oob_gc.sh +47 -0
  172. data/t/t9002-oob_gc-path.sh +75 -0
  173. data/t/test-lib.sh +113 -0
  174. data/t/test-rails3.sh +27 -0
  175. data/t/write-on-close.ru +11 -0
  176. data/test/aggregate.rb +15 -0
  177. data/test/benchmark/README +50 -0
  178. data/test/benchmark/dd.ru +18 -0
  179. data/test/benchmark/stack.ru +8 -0
  180. data/test/exec/README +5 -0
  181. data/test/exec/test_exec.rb +1055 -0
  182. data/test/rails/app-1.2.3/.gitignore +2 -0
  183. data/test/rails/app-1.2.3/Rakefile +7 -0
  184. data/test/rails/app-1.2.3/app/controllers/application.rb +6 -0
  185. data/test/rails/app-1.2.3/app/controllers/foo_controller.rb +36 -0
  186. data/test/rails/app-1.2.3/app/helpers/application_helper.rb +4 -0
  187. data/test/rails/app-1.2.3/config/boot.rb +11 -0
  188. data/test/rails/app-1.2.3/config/database.yml +12 -0
  189. data/test/rails/app-1.2.3/config/environment.rb +13 -0
  190. data/test/rails/app-1.2.3/config/environments/development.rb +9 -0
  191. data/test/rails/app-1.2.3/config/environments/production.rb +5 -0
  192. data/test/rails/app-1.2.3/config/routes.rb +6 -0
  193. data/test/rails/app-1.2.3/db/.gitignore +0 -0
  194. data/test/rails/app-1.2.3/log/.gitignore +1 -0
  195. data/test/rails/app-1.2.3/public/404.html +1 -0
  196. data/test/rails/app-1.2.3/public/500.html +1 -0
  197. data/test/rails/app-2.0.2/.gitignore +2 -0
  198. data/test/rails/app-2.0.2/Rakefile +7 -0
  199. data/test/rails/app-2.0.2/app/controllers/application.rb +4 -0
  200. data/test/rails/app-2.0.2/app/controllers/foo_controller.rb +36 -0
  201. data/test/rails/app-2.0.2/app/helpers/application_helper.rb +4 -0
  202. data/test/rails/app-2.0.2/config/boot.rb +11 -0
  203. data/test/rails/app-2.0.2/config/database.yml +12 -0
  204. data/test/rails/app-2.0.2/config/environment.rb +17 -0
  205. data/test/rails/app-2.0.2/config/environments/development.rb +8 -0
  206. data/test/rails/app-2.0.2/config/environments/production.rb +5 -0
  207. data/test/rails/app-2.0.2/config/routes.rb +6 -0
  208. data/test/rails/app-2.0.2/db/.gitignore +0 -0
  209. data/test/rails/app-2.0.2/log/.gitignore +1 -0
  210. data/test/rails/app-2.0.2/public/404.html +1 -0
  211. data/test/rails/app-2.0.2/public/500.html +1 -0
  212. data/test/rails/app-2.1.2/.gitignore +2 -0
  213. data/test/rails/app-2.1.2/Rakefile +7 -0
  214. data/test/rails/app-2.1.2/app/controllers/application.rb +4 -0
  215. data/test/rails/app-2.1.2/app/controllers/foo_controller.rb +36 -0
  216. data/test/rails/app-2.1.2/app/helpers/application_helper.rb +4 -0
  217. data/test/rails/app-2.1.2/config/boot.rb +111 -0
  218. data/test/rails/app-2.1.2/config/database.yml +12 -0
  219. data/test/rails/app-2.1.2/config/environment.rb +17 -0
  220. data/test/rails/app-2.1.2/config/environments/development.rb +7 -0
  221. data/test/rails/app-2.1.2/config/environments/production.rb +5 -0
  222. data/test/rails/app-2.1.2/config/routes.rb +6 -0
  223. data/test/rails/app-2.1.2/db/.gitignore +0 -0
  224. data/test/rails/app-2.1.2/log/.gitignore +1 -0
  225. data/test/rails/app-2.1.2/public/404.html +1 -0
  226. data/test/rails/app-2.1.2/public/500.html +1 -0
  227. data/test/rails/app-2.2.2/.gitignore +2 -0
  228. data/test/rails/app-2.2.2/Rakefile +7 -0
  229. data/test/rails/app-2.2.2/app/controllers/application.rb +4 -0
  230. data/test/rails/app-2.2.2/app/controllers/foo_controller.rb +36 -0
  231. data/test/rails/app-2.2.2/app/helpers/application_helper.rb +4 -0
  232. data/test/rails/app-2.2.2/config/boot.rb +111 -0
  233. data/test/rails/app-2.2.2/config/database.yml +12 -0
  234. data/test/rails/app-2.2.2/config/environment.rb +17 -0
  235. data/test/rails/app-2.2.2/config/environments/development.rb +7 -0
  236. data/test/rails/app-2.2.2/config/environments/production.rb +5 -0
  237. data/test/rails/app-2.2.2/config/routes.rb +6 -0
  238. data/test/rails/app-2.2.2/db/.gitignore +0 -0
  239. data/test/rails/app-2.2.2/log/.gitignore +1 -0
  240. data/test/rails/app-2.2.2/public/404.html +1 -0
  241. data/test/rails/app-2.2.2/public/500.html +1 -0
  242. data/test/rails/test_rails.rb +287 -0
  243. data/test/test_helper.rb +300 -0
  244. data/test/unit/test_configurator.rb +158 -0
  245. data/test/unit/test_droplet.rb +28 -0
  246. data/test/unit/test_http_parser.rb +860 -0
  247. data/test/unit/test_http_parser_ng.rb +716 -0
  248. data/test/unit/test_http_parser_xftrust.rb +38 -0
  249. data/test/unit/test_request.rb +197 -0
  250. data/test/unit/test_response.rb +99 -0
  251. data/test/unit/test_server.rb +289 -0
  252. data/test/unit/test_signals.rb +207 -0
  253. data/test/unit/test_sni_hostnames.rb +47 -0
  254. data/test/unit/test_socket_helper.rb +192 -0
  255. data/test/unit/test_stream_input.rb +204 -0
  256. data/test/unit/test_tee_input.rb +296 -0
  257. data/test/unit/test_upload.rb +306 -0
  258. data/test/unit/test_util.rb +100 -0
  259. metadata +428 -0
@@ -0,0 +1,208 @@
1
+ .TH UNICORN_RAILS 1 "September 17, 2009" "Unicorn User Manual"
2
+ .SH NAME
3
+ .PP
4
+ unicorn_rails - a script/server-like command to launch the Unicorn HTTP
5
+ server
6
+ .SH SYNOPSIS
7
+ .PP
8
+ unicorn_rails [-c CONFIG_FILE] [-E RAILS_ENV] [-D] [RACKUP_FILE]
9
+ .SH DESCRIPTION
10
+ .PP
11
+ A rackup(1)-like command to launch Rails applications using Unicorn.
12
+ It is expected to be started in your Rails application root
13
+ (RAILS_ROOT), but the "working_directory" directive may be used in the
14
+ CONFIG_FILE.
15
+ .PP
16
+ It is designed to help Rails 1.x and 2.y users transition to Rack, but
17
+ it is NOT needed for Rails 3 applications.
18
+ Rails 3 users are encouraged to use unicorn(1) instead of
19
+ unicorn_rails(1).
20
+ Users of Rails 1.x/2.y may also use unicorn(1) instead of
21
+ unicorn_rails(1).
22
+ .PP
23
+ The outward interface resembles rackup(1), the internals and default
24
+ middleware loading is designed like the \f[C]script/server\f[] command
25
+ distributed with Rails.
26
+ .PP
27
+ While Unicorn takes a myriad of command-line options for compatibility
28
+ with ruby(1) and rackup(1), it is recommended to stick to the few
29
+ command-line options specified in the SYNOPSIS and use the CONFIG_FILE
30
+ as much as possible.
31
+ .SH UNICORN OPTIONS
32
+ .TP
33
+ .B -c, --config-file CONFIG_FILE
34
+ Path to the Unicorn-specific config file.
35
+ The config file is implemented as a Ruby DSL, so Ruby code may executed.
36
+ See the RDoc/ri for the \f[I]Unicorn::Configurator\f[] class for the
37
+ full list of directives available from the DSL.
38
+ Using an absolute path for for CONFIG_FILE is recommended as it makes
39
+ multiple instances of Unicorn easily distinguishable when viewing ps(1)
40
+ output.
41
+ .RS
42
+ .RE
43
+ .TP
44
+ .B -D, --daemonize
45
+ Run daemonized in the background.
46
+ The process is detached from the controlling terminal and stdin is
47
+ redirected to "/dev/null".
48
+ Unlike many common UNIX daemons, we do not chdir to "/" upon
49
+ daemonization to allow more control over the startup/upgrade process.
50
+ Unless specified in the CONFIG_FILE, stderr and stdout will also be
51
+ redirected to "/dev/null".
52
+ Daemonization will \f[I]skip\f[] loading of the
53
+ \f[I]Rails::Rack::LogTailer\f[] middleware under Rails >= 2.3.x.
54
+ By default, unicorn_rails(1) will create a PID file in
55
+ \f[I]"RAILS_ROOT/tmp/pids/unicorn.pid"\f[].
56
+ You may override this by specifying the "pid" directive to override this
57
+ Unicorn config file.
58
+ .RS
59
+ .RE
60
+ .TP
61
+ .B -E, --env RAILS_ENV
62
+ Run under the given RAILS_ENV.
63
+ This sets the RAILS_ENV environment variable.
64
+ Acceptable values are exactly those you expect in your Rails
65
+ application, typically "development" or "production".
66
+ .RS
67
+ .RE
68
+ .TP
69
+ .B -l, --listen ADDRESS
70
+ Listens on a given ADDRESS.
71
+ ADDRESS may be in the form of HOST:PORT or PATH, HOST:PORT is taken to
72
+ mean a TCP socket and PATH is meant to be a path to a UNIX domain
73
+ socket.
74
+ Defaults to "0.0.0.0:8080" (all addresses on TCP port 8080).
75
+ For production deployments, specifying the "listen" directive in
76
+ CONFIG_FILE is recommended as it allows fine-tuning of socket options.
77
+ .RS
78
+ .RE
79
+ .SH RACKUP COMPATIBILITY OPTIONS
80
+ .TP
81
+ .B -o, --host HOST
82
+ Listen on a TCP socket belonging to HOST, default is "0.0.0.0" (all
83
+ addresses).
84
+ If specified multiple times on the command-line, only the last-specified
85
+ value takes effect.
86
+ This option only exists for compatibility with the rackup(1) command,
87
+ use of "-l"/"--listen" switch is recommended instead.
88
+ .RS
89
+ .RE
90
+ .TP
91
+ .B -p, --port PORT
92
+ Listen on the specified TCP PORT, default is 8080.
93
+ If specified multiple times on the command-line, only the last-specified
94
+ value takes effect.
95
+ This option only exists for compatibility with the rackup(1) command,
96
+ use of "-l"/"--listen" switch is recommended instead.
97
+ .RS
98
+ .RE
99
+ .TP
100
+ .B --path PATH
101
+ Mounts the Rails application at the given PATH (instead of "/").
102
+ This is equivalent to setting the RAILS_RELATIVE_URL_ROOT environment
103
+ variable.
104
+ This is only supported under Rails 2.3 or later at the moment.
105
+ .RS
106
+ .RE
107
+ .SH RUBY OPTIONS
108
+ .TP
109
+ .B -e, --eval LINE
110
+ Evaluate a LINE of Ruby code.
111
+ This evaluation happens immediately as the command-line is being parsed.
112
+ .RS
113
+ .RE
114
+ .TP
115
+ .B -d, --debug
116
+ Turn on debug mode, the $DEBUG variable is set to true.
117
+ For Rails >= 2.3.x, this loads the \f[I]Rails::Rack::Debugger\f[]
118
+ middleware.
119
+ .RS
120
+ .RE
121
+ .TP
122
+ .B -w, --warn
123
+ Turn on verbose warnings, the $VERBOSE variable is set to true.
124
+ .RS
125
+ .RE
126
+ .TP
127
+ .B -I, --include PATH
128
+ specify $LOAD_PATH.
129
+ PATH will be prepended to $LOAD_PATH.
130
+ The \[aq]:\[aq] character may be used to delimit multiple directories.
131
+ This directive may be used more than once.
132
+ Modifications to $LOAD_PATH take place immediately and in the order they
133
+ were specified on the command-line.
134
+ .RS
135
+ .RE
136
+ .TP
137
+ .B -r, --require LIBRARY
138
+ require a specified LIBRARY before executing the application.
139
+ The "require" statement will be executed immediately and in the order
140
+ they were specified on the command-line.
141
+ .RS
142
+ .RE
143
+ .SH RACKUP FILE
144
+ .PP
145
+ This defaults to "config.ru" in RAILS_ROOT.
146
+ It should be the same file used by rackup(1) and other Rack launchers,
147
+ it uses the \f[I]Rack::Builder\f[] DSL.
148
+ Unlike many other Rack applications, RACKUP_FILE is completely
149
+ \f[I]optional\f[] for Rails, but may be used to disable some of the
150
+ default middleware for performance.
151
+ .PP
152
+ Embedded command-line options are mostly parsed for compatibility with
153
+ rackup(1) but strongly discouraged.
154
+ .SH ENVIRONMENT VARIABLES
155
+ .PP
156
+ The RAILS_ENV variable is set by the aforementioned -E switch.
157
+ The RAILS_RELATIVE_URL_ROOT is set by the aforementioned --path switch.
158
+ Either of these variables may also be set in the shell or the Unicorn
159
+ CONFIG_FILE.
160
+ All application or library-specific environment variables (e.g.
161
+ TMPDIR, RAILS_ASSET_ID) may always be set in the Unicorn CONFIG_FILE in
162
+ addition to the spawning shell.
163
+ When transparently upgrading Unicorn, all environment variables set in
164
+ the old master process are inherited by the new master process.
165
+ Unicorn only uses (and will overwrite) the UNICORN_FD environment
166
+ variable internally when doing transparent upgrades.
167
+ .SH SIGNALS
168
+ .PP
169
+ The following UNIX signals may be sent to the master process:
170
+ .IP \[bu] 2
171
+ HUP - reload config file, app, and gracefully restart all workers
172
+ .IP \[bu] 2
173
+ INT/TERM - quick shutdown, kills all workers immediately
174
+ .IP \[bu] 2
175
+ QUIT - graceful shutdown, waits for workers to finish their current
176
+ request before finishing.
177
+ .IP \[bu] 2
178
+ USR1 - reopen all logs owned by the master and all workers See
179
+ Unicorn::Util.reopen_logs for what is considered a log.
180
+ .IP \[bu] 2
181
+ USR2 - reexecute the running binary.
182
+ A separate QUIT should be sent to the original process once the child is
183
+ verified to be up and running.
184
+ .IP \[bu] 2
185
+ WINCH - gracefully stops workers but keep the master running.
186
+ This will only work for daemonized processes.
187
+ .IP \[bu] 2
188
+ TTIN - increment the number of worker processes by one
189
+ .IP \[bu] 2
190
+ TTOU - decrement the number of worker processes by one
191
+ .PP
192
+ See the SIGNALS (http://unicorn.bogomips.org/SIGNALS.html) document for
193
+ full description of all signals used by Unicorn.
194
+ .SH SEE ALSO
195
+ .IP \[bu] 2
196
+ unicorn(1)
197
+ .IP \[bu] 2
198
+ \f[I]Rack::Builder\f[] ri/RDoc
199
+ .IP \[bu] 2
200
+ \f[I]Unicorn::Configurator\f[] ri/RDoc
201
+ .IP \[bu] 2
202
+ Unicorn RDoc (http://unicorn.bogomips.org/)
203
+ .IP \[bu] 2
204
+ Rack RDoc (http://rack.rubyforge.org/doc/)
205
+ .IP \[bu] 2
206
+ Rackup HowTo (http://wiki.github.com/rack/rack/tutorial-rackup-howto)
207
+ .SH AUTHORS
208
+ The Unicorn Community <mongrel-unicorn@rubyforge.org>.
@@ -0,0 +1,44 @@
1
+ # -*- encoding: binary -*-
2
+ ENV["VERSION"] or abort "VERSION= must be specified"
3
+ manifest = File.readlines('.manifest').map! { |x| x.chomp! }
4
+ require 'wrongdoc'
5
+ extend Wrongdoc::Gemspec
6
+ name, summary, title = readme_metadata
7
+
8
+ # don't bother with tests that fork, not worth our time to get working
9
+ # with `gem check -t` ... (of course we care for them when testing with
10
+ # GNU make when they can run in parallel)
11
+ test_files = manifest.grep(%r{\Atest/unit/test_.*\.rb\z}).map do |f|
12
+ File.readlines(f).grep(/\bfork\b/).empty? ? f : nil
13
+ end.compact
14
+
15
+ Gem::Specification.new do |s|
16
+ s.name = %q{preplay_unicorn}
17
+ s.version = ENV["VERSION"].dup
18
+ s.authors = ["#{name} hackers"]
19
+ s.summary = summary
20
+ s.date = Time.now.utc.strftime('%Y-%m-%d')
21
+ s.description = readme_description
22
+ s.email = %q{mongrel-unicorn@rubyforge.org}
23
+ s.executables = %w(unicorn unicorn_rails)
24
+ s.extensions = %w(ext/unicorn_http/extconf.rb)
25
+ s.extra_rdoc_files = extra_rdoc_files(manifest)
26
+ s.files = manifest
27
+ s.homepage = Wrongdoc.config[:rdoc_url]
28
+ s.rdoc_options = rdoc_options
29
+ s.rubyforge_project = %q{mongrel}
30
+ s.test_files = test_files
31
+
32
+ # for people that are absolutely stuck on Rails 2.3.2 and can't
33
+ # up/downgrade to any other version, the Rack dependency may be
34
+ # commented out. Nevertheless, upgrading to Rails 2.3.4 or later is
35
+ # *strongly* recommended for security reasons.
36
+ s.add_dependency(%q<rack>)
37
+ s.add_dependency(%q<kgio>, '~> 2.6')
38
+ s.add_dependency(%q<raindrops>, '~> 0.7')
39
+
40
+ s.add_development_dependency('isolate', '~> 3.2')
41
+ s.add_development_dependency('wrongdoc', '~> 1.6.1')
42
+
43
+ # s.licenses = %w(GPLv2 Ruby) # licenses= method is not in older RubyGems
44
+ end
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env ruby
2
+ # scripts/Makefiles can read and eval the output of this script and
3
+ # use it as RUBYLIB
4
+ require 'rubygems'
5
+ require 'isolate'
6
+ fp = File.open(__FILE__, "rb")
7
+ fp.flock(File::LOCK_EX)
8
+
9
+ ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby'
10
+ opts = {
11
+ :system => false,
12
+ # we want "ruby-1.8.7" and not "ruby-1.8", so disable :multiruby
13
+ :multiruby => false,
14
+ :path => "tmp/isolate/#{ruby_engine}-#{RUBY_VERSION}",
15
+ }
16
+
17
+ pid = fork do
18
+ Isolate.now!(opts) do
19
+ if RUBY_VERSION.to_f < 2.0
20
+ gem 'sqlite3-ruby', '1.2.5'
21
+ end
22
+ gem 'raindrops', '0.8.0'
23
+ gem 'kgio-monkey', '0.4.0'
24
+ gem 'kgio', '2.7.4'
25
+ gem 'rack', '1.4.1'
26
+ end
27
+ end
28
+ _, status = Process.waitpid2(pid)
29
+ status.success? or abort status.inspect
30
+ lib_paths = Dir["#{opts[:path]}/gems/*-*/lib"].map { |x| File.expand_path(x) }
31
+ dst = "tmp/isolate/#{ruby_engine}-#{RUBY_VERSION}.mk"
32
+ File.open("#{dst}.#$$", "w") do |fp|
33
+ fp.puts "ISOLATE_LIBS=#{lib_paths.join(':')}"
34
+ end
35
+ File.rename("#{dst}.#$$", dst)
36
+
37
+ # pure Ruby gems can be shared across all Rubies
38
+ %w(3.0.0).each do |rails_ver|
39
+ opts[:path] = "tmp/isolate/rails-#{rails_ver}"
40
+ pid = fork do
41
+ Isolate.now!(opts) do
42
+ gem 'rake', '0.8.7'
43
+ gem 'rails', rails_ver
44
+ end
45
+ end
46
+ _, status = Process.waitpid2(pid)
47
+ status.success? or abort status.inspect
48
+ more = Dir["#{opts[:path]}/gems/*-*/lib"].map { |x| File.expand_path(x) }
49
+ lib_paths.concat(more)
50
+ end