diff options
author | Eric Wong <e@80x24.org> | 2016-03-17 00:27:36 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-03-17 16:35:21 +0000 |
commit | afde9a73a0eafb9c52b3d4ce2911692924ea626e (patch) | |
tree | fc7372d8757db634d44f76ebdb418150e705f218 /examples | |
parent | 735d0f82adcdf9851664136424004dacfbe2423c (diff) | |
download | unicorn-afde9a73a0eafb9c52b3d4ce2911692924ea626e.tar.gz |
"bundle exec" alone is not suitable for use with systemd-style socket activation due to Ruby 2.0+ behavior of setting close-on-exec for file descriptors above 2. However, the "--keep-file-descriptors" option was added to bundler 1.4.0 to workaround this Ruby 2.0 change and may be used to prevent Ruby 2.0+ from closing file descriptors on exec. Thanks to Amir Yalon and Christos Trochalakis for bringing up this issue on the mailing list: http://bogomips.org/unicorn-public/1457824748.3666627.547425122.2A828B07@webmail.messagingengine.com/
Diffstat (limited to 'examples')
-rw-r--r-- | examples/unicorn@.service | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/unicorn@.service b/examples/unicorn@.service index b058da5..56aaec8 100644 --- a/examples/unicorn@.service +++ b/examples/unicorn@.service @@ -11,6 +11,8 @@ Wants = unicorn.socket After = unicorn.socket [Service] +# bundler users must use the "--keep-file-descriptors" switch, here: +# ExecStart = bundle exec --keep-file-descriptors unicorn -c ... ExecStart = /usr/bin/unicorn -c /path/to/unicorn.conf.rb /path/to/config.ru Sockets = unicorn.socket KillSignal = SIGQUIT |