[libmessage-passing-zeromq-perl] 69/78: only invoke swap related madness if we're using a swap file
Jonas Smedegaard
js at alioth.debian.org
Mon Sep 30 09:28:29 UTC 2013
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository libmessage-passing-zeromq-perl.
commit b0186206eac5196a4d8f115875966240f3e35018
Author: Tomas Doran <tdoran at yelp.com>
Date: Sat Aug 17 00:09:26 2013 -0700
only invoke swap related madness if we're using a swap file
---
lib/Message/Passing/ZeroMQ/Role/HasASocket.pm | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/lib/Message/Passing/ZeroMQ/Role/HasASocket.pm b/lib/Message/Passing/ZeroMQ/Role/HasASocket.pm
index dcdc4ae..5e403c1 100644
--- a/lib/Message/Passing/ZeroMQ/Role/HasASocket.pm
+++ b/lib/Message/Passing/ZeroMQ/Role/HasASocket.pm
@@ -81,12 +81,14 @@ sub setsockopt {
my ($self, $socket) = @_;
$socket->setsockopt(ZMQ_HWM, $self->socket_hwm);
- # work around ZeroMQ issue 140: ZMQ_SWAP expects to
- # be able to write to the current directory and
- # crashes if it can't
- chdir("/tmp");
-
- $socket->setsockopt(ZMQ_SWAP, $self->socket_swap);
+ if ($self->socket_swap > 0) {
+ # work around ZeroMQ issue 140: ZMQ_SWAP expects to
+ # be able to write to the current directory and
+ # crashes if it can't
+ chdir("/tmp");
+
+ $socket->setsockopt(ZMQ_SWAP, $self->socket_swap);
+ }
}
has socket_bind => (
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmessage-passing-zeromq-perl.git
More information about the Pkg-perl-cvs-commits
mailing list