Skip to content

Commit

Permalink
use tmp directory in recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 26, 2013
1 parent 6ea3982 commit 861be3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

4.27 2013-08-25
4.27 2013-08-26
- Added acceptors attribute to Mojo::Server::Daemon.
- Added handle method to Mojo::IOLoop::Server.
- Added -V option to eval command.
Expand Down
6 changes: 3 additions & 3 deletions lib/Mojolicious/Guides/Cookbook.pod
Expand Up @@ -145,15 +145,15 @@ as you can see above, but on modern operating systems that support the
C<SO_REUSEPORT> socket option, there is also another method available that
works with all built-in web servers.

$ ./script/myapp prefork -P ./first.pid -l http://*:8080?reuse=1
$ ./script/myapp prefork -P /tmp/first.pid -l http://*:8080?reuse=1
Server available at http://127.0.0.1:8080.

All you have to do is start a second web server listening to the same port and
stop the first web server gracefully afterwards.

$ ./script/myapp prefork -P ./second.pid -l http://*:8080?reuse=1
$ ./script/myapp prefork -P /tmp/second.pid -l http://*:8080?reuse=1
Server available at http://127.0.0.1:8080.
$ kill -s TERM `cat ./first.pid`
$ kill -s TERM `cat /tmp/first.pid`

Just remember that both web servers need to be started with the C<reuse>
parameter.
Expand Down

0 comments on commit 861be3f

Please sign in to comment.