Skip to content

Commit 3a573af

Browse files
author
bradfitz
committed
can't use MSG_NOSIGNAL in a BEGIN block, it turns out, so my optimization
for Linux and other Unices with MSG_NOSIGNAL wasn't working before. this works, while still working on FreeBSD/Solaris/etc git-svn-id: http://code.sixapart.com/svn/memcached/trunk/api/perl@170 b0b603af-a30f-0410-a34e-baf09ae79d0b
1 parent 7e90878 commit 3a573af

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Memcached.pm

+3-2
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ use constant COMPRESS_SAVINGS => 0.20; # percent
2727
use vars qw($VERSION $HAVE_ZLIB $FLAG_NOSIGNAL);
2828
$VERSION = "1.0.12-pre";
2929

30-
$FLAG_NOSIGNAL = 0;
3130
BEGIN {
3231
$HAVE_ZLIB = eval "use Compress::Zlib (); 1;";
33-
$FLAG_NOSIGNAL = eval { MSG_NOSIGNAL } || 0;
3432
}
3533

34+
$FLAG_NOSIGNAL = 0;
35+
eval { $FLAG_NOSIGNAL = MSG_NOSIGNAL; };
36+
3637
my %host_dead; # host -> unixtime marked dead until
3738
my %cache_sock; # host -> socket
3839

0 commit comments

Comments
 (0)