view release on metacpan or search on metacpan
"# mime-type: $CIPP->{mime_type}\n".
"sub $sub_name {\nmy (\$cipp_apache_request) = \@_;\n".
$perl_code.
"}\n";
$self->write_locked ($sub_filename, \$perl_code);
# Cache-Dependency-File updaten
$self->set_dependency ($CIPP->Get_Used_Macros);
# Perl-Syntax-Check
foreach $uri (keys %{$href}) {
push @list, $self->resolve_uri($uri);
}
}
$self->write_locked ($dep_filename, join ("\t", @list));
}
sub compile {
my $self = shift;
return 1 if $self->sub_cache_ok;
my $sub_name = $self->{sub_name};
my $sub_filename = $self->{sub_filename};
my $sub_sref = $self->read_locked ($sub_filename);
# cut off fist line (with mime type)
$$sub_sref =~ s/^(.*)\n//;
# extract mime type
my $uri = $self->{uri};
my ($type) = split ("\t", $error);
if ( $type eq 'cipp-syntax' ) {
$self->write_locked ($err_filename, $error);
} else {
unlink $sub_filename;
unlink $err_filename;
}
if ( -e $cache_file ) {
my $cache_time = (stat ($cache_file))[9];
my $dep_filename = $self->{dep_filename};
my $data_sref = $self->read_locked ($dep_filename);
my @list = split ("\t", $$data_sref);
my $path;
foreach $path (@list) {
my $file_time = (stat ($path))[9];
my $self = shift;
my $err_filename = $self->{err_filename};
if ( -e $err_filename ) {
my $error_sref = $self->read_locked ($err_filename);
$self->{'error'} = $$error_sref;
$self->{status}->{cached_error} = 1;
return 1;
$self->{'debug'} && print STDERR "lookup_uri: base=$self->{uri}: '$uri' -> '$filename'\n";
return $filename;
}
sub write_locked {
my $self = shift;
my ($filename, $data) = @_;
my $data_sref;
print $fh $$data_sref or croak "can't write data $filename";
truncate $fh, length($$data_sref) or croak "can't truncate $filename";
close $fh;
}
sub read_locked {
my $self = shift;
my ($filename) = @_;
my $fh = new FileHandle;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Info.pm view on Meta::CPAN
($value =~ /\/\*\*\/ORDER\/\*\*\/BY\/\*\*/ix) ||
($value =~ /\/AND\/.+\(SELECT\//) || # United/**/States)/**/AND/**/(SELECT/**/6734/**/FROM/**/(SELECT(SLEEP(5)))lRNi)/**/AND/**/(8984=8984
($value =~ /exec(\s|\+)+(s|x)p\w+/ix)) {
$self->status(403);
if($ENV{'REMOTE_ADDR'}) {
$self->_warn($ENV{'REMOTE_ADDR'} . ": SQL injection attempt blocked for '$value'");
} else {
$self->_warn("SQL injection attempt blocked for '$value'");
}
return;
}
if(my $agent = $ENV{'HTTP_USER_AGENT'}) {
if(($agent =~ /SELECT.+AND.+/) || ($agent =~ /ORDER BY /) || ($agent =~ / OR NOT /) || ($agent =~ / AND \d+=\d+/) || ($agent =~ /THEN.+ELSE.+END/) || ($agent =~ /.+AND.+SELECT.+/) || ($agent =~ /\sAND\s.+\sAND\s/)) {
$self->status(403);
if($ENV{'REMOTE_ADDR'}) {
$self->_warn($ENV{'REMOTE_ADDR'} . ": SQL injection attempt blocked for '$agent'");
} else {
$self->_warn("SQL injection attempt blocked for '$agent'");
}
return 1;
}
}
if(($value =~ /((\%3C)|<)((\%2F)|\/)*[a-z0-9\%]+((\%3E)|>)/ix) ||
($value =~ /((\%3C)|<)[^\n]+((\%3E)|>)/i) ||
($orig_value =~ /((\%3C)|<)((\%2F)|\/)*[a-z0-9\%]+((\%3E)|>)/ix) ||
($orig_value =~ /((\%3C)|<)[^\n]+((\%3E)|>)/i)) {
$self->status(403);
$self->_warn("XSS injection attempt blocked for '$value'");
return;
}
if($value =~ /mustleak\.com\//) {
$self->status(403);
$self->_warn("Blocked mustleak attack for '$key'");
return;
}
if($value =~ /\.\.\//) {
$self->status(403);
$self->_warn("Blocked directory traversal attack for '$key'");
return;
}
}
if(length($value) > 0) {
# Don't add if it's already there
lib/CGI/Info.pm view on Meta::CPAN
# See also params()
if(($agent =~ /SELECT.+AND.+/) || ($agent =~ /ORDER BY /) || ($agent =~ / OR NOT /) || ($agent =~ / AND \d+=\d+/) || ($agent =~ /THEN.+ELSE.+END/) || ($agent =~ /.+AND.+SELECT.+/) || ($agent =~ /\sAND\s.+\sAND\s/)) {
$self->status(403);
$self->{is_robot} = 1;
if($ENV{'REMOTE_ADDR'}) {
$self->_warn($ENV{'REMOTE_ADDR'} . ": SQL injection attempt blocked for '$agent'");
} else {
$self->_warn("SQL injection attempt blocked for '$agent'");
}
return 1;
}
if($agent =~ /.+bot|axios\/1\.6\.7|bytespider|ClaudeBot|msnptc|CriteoBot|is_archiver|backstreet|linkfluence\.com|spider|scoutjet|gingersoftware|heritrix|dodnetdotcom|yandex|nutch|ezooms|plukkie|nova\.6scan\.com|Twitterbot|adscanner|Go-http-client|py...
$self->{is_robot} = 1;
lib/CGI/Info.pm view on Meta::CPAN
# Mine
'http://www.seokicks.de/robot.html',
);
$referrer =~ s/\\/_/g;
if(($referrer =~ /\)/) || (List::Util::any { $_ =~ /^$referrer/ } @crawler_lists)) {
$self->_debug("is_robot: blocked trawler $referrer");
if($self->{cache}) {
$self->{cache}->set($key, 'robot', '1 day');
}
$self->{is_robot} = 1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Inspect/htdocs/js/themes/smoothness/jquery-ui-1.7.1.custom.css view on Meta::CPAN
.ui-icon-suitcase { background-position: -112px -96px; }
.ui-icon-comment { background-position: -128px -96px; }
.ui-icon-person { background-position: -144px -96px; }
.ui-icon-print { background-position: -160px -96px; }
.ui-icon-trash { background-position: -176px -96px; }
.ui-icon-locked { background-position: -192px -96px; }
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
view all matches for this distribution
view release on metacpan or search on metacpan
MxScreen/Session/Medium/File.pm view on Meta::CPAN
my $path = $self->_id_to_path($id);
my $lockmgr = $self->{lockmgr};
my $lock = $lockmgr->lock($path);
my $array = $self->_retrieve_locked($path);
$lock->release if defined $lock;
return DVAL undef unless defined $array;
my $token = CGI::param(MX_TOKEN);
MxScreen/Session/Medium/File.pm view on Meta::CPAN
return DVAL $array->[1];
}
#
# ->_retrieve_locked
#
# retrieve context from (locked) file.
#
sub _retrieve_locked {
DFEATURE my $f_;
my $self = shift;
my ($path) = @_;
my $serializer = $self->serializer;
MxScreen/Session/Medium/File.pm view on Meta::CPAN
# a random token.
#
my $store = [$self->_generate_session_id, $context];
$self->_store_locked($path, $store);
$lock->release if defined $lock;
#
# Return the hidden parameters to generate in the HTML output.
#
MxScreen/Session/Medium/File.pm view on Meta::CPAN
return DVAL $ret;
}
#
# ->_store_locked
#
# Store context into (locked) file.
#
sub _store_locked {
DFEATURE my $f_;
my $self = shift;
my ($path, $context) = @_;
my $serializer = $self->serializer;
view all matches for this distribution
view release on metacpan or search on metacpan
demo/README view on Meta::CPAN
export OQBASEPATH=/path/to/perl-CGI-OptimalQuery
sudo chgrp -R apache $OQBASEPATH
sudo chmod -R u=rwX,go=rX $OQBASEPATH
sudo chmod -R ug+rwx $OQBASEPATH/demo/cgi-bin
# if SELinux is installed, set file contexts so apache process is not blocked
# run command: `sestatus` to determine if SELinux is enabled on your system
sudo chcon -R system_u:object_r:httpd_sys_content_t:s0 $OQBASEPATH/demo/cgi-bin
sudo chcon -R system_u:object_r:httpd_sys_rw_content_t:s0 $OQBASEPATH/demo/db
sudo chcon -R system_u:object_r:usr_t:s0 $OQBASEPATH/lib
view all matches for this distribution
view release on metacpan or search on metacpan
t/public_html/demo/civil.txt view on Meta::CPAN
get over this obstruction to his neighborliness without a ruder and
more impetuous thought or speech corresponding with his action. I know
this well, that if one thousand, if one hundred, if ten men whom I
could name- if ten honest men only- ay, if one HONEST man, in this
State of Massachusetts, ceasing to hold slaves, were actually to
withdraw from this copartnership, and be locked up in the county
jail therefor, it would be the abolition of slavery in America. For it
matters not how small the beginning may seem to be: what is once
well done is done forever. But we love better to talk about it: that
we say is our mission, Reform keeps many scores of newspapers in its
service, but not one man. If my esteemed neighbor, the State's
t/public_html/demo/civil.txt view on Meta::CPAN
Legislature would not wholly waive the subject the following winter.
Under a government which imprisons any unjustly, the true place
for a just man is also a prison. The proper place today, the only
place which Massachusetts has provided for her freer and less
desponding spirits, is in her prisons, to be put out and locked out of
the State by her own act, as they have already put themselves out by
their principles. It is there that the fugitive slave, and the Mexican
prisoner on parole, and the Indian come to plead the wrongs of his
race should find them; on that separate, but more free and
honorable, ground, where the State places those who are not with
t/public_html/demo/civil.txt view on Meta::CPAN
were worth less in that case.
Some years ago, the State met me in behalf of the Church, and
commanded me to pay a certain sum toward the support of a clergyman
whose preaching my father attended, but never I myself. "Pay," it
said, "or be locked up in the jail." I declined to pay. But,
unfortunately, another man saw fit to pay it. I did not see why the
schoolmaster should be taxed to support the priest, and not the priest
the schoolmaster; for I was not the State's schoolmaster, but I
supported myself by voluntary subscription. I did not see why the
lyceum should not present its tax-bill, and have the State to back its
t/public_html/demo/civil.txt view on Meta::CPAN
I have paid no poll-tax for six years. I was put into a jail once on
this account, for one night; and, as I stood considering the walls
of solid stone, two or three feet thick, the door of wood and iron,
a foot thick, and the iron grating which strained the light, I could
not help being struck with the foolishness of that institution which
treated me as if I were mere flesh and blood and bones, to be locked
up. I wondered that it should have concluded at length that this was
the best use it could put me to, and had never thought to avail itself
of my services in some way. I saw that, if there was a wall of stone
between me and my townsmen, there was a still more difficult one to
climb or break through before they could get to be as free as I was. I
t/public_html/demo/civil.txt view on Meta::CPAN
of stone and mortar. I felt as if I alone of all my townsmen had
paid my tax. They plainly did not know how to treat me, but behaved
like persons who are underbred. In every threat and in every
compliment there was a blunder; for they thought that my chief
desire was to stand the other side of that stone wall. I could not but
smile to see how industriously they locked the door on my meditations,
which followed them out again without let or hindrance, and they
were really all that was dangerous. As they could not reach me, they
had resolved to punish my body; just as boys, if they cannot come at
some person against whom they have a spite, will abuse his dog. I
saw that the State was half-witted, that it was timid as a lone
t/public_html/demo/civil.txt view on Meta::CPAN
prisoners in their shirt-sleeves were enjoying a chat and the
evening air in the doorway, when I entered. But the jailer said,
"Come, boys, it is time to lock up"; and so they dispersed, and I
heard the sound of their steps returning into the hollow apartments.
My room-mate was introduced to me by the jailer as "a first-rate
fellow and a clever man." When the door was locked, he showed me where
to hang my hat, and how he managed matters there. The rooms were
whitewashed once a month; and this one, at least, was the whitest,
most simply furnished, and probably the neatest apartment in the town.
He naturally wanted to know where I came from, and what brought me
there; and, when I had told him, I asked him in my turn how he came
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/CGI/Snapp/RunModes.pm view on Meta::CPAN
{
my($self) = @_;
$self -> mode_param('rm');
# This will croak when the run mode is locked.
$self -> prerun_mode('begin');
} # End of set_mode_param_2.
view all matches for this distribution
view release on metacpan or search on metacpan
- Fix too many backends problem reported by Theo Petersen. The
problem is due to temp-file corruption that occurs when the
web-server sends a TERM signal to the frontend while it is working
on the temp file. It also results in some backends failing due
to the corruption. Added a fix so that signals are always blocked
while working on the temp file.
- Shutdown handler should be called after script is touched.
- Fixes for Mac OS X 10.1. Workaround the sigpending() bug,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Wiki/Store/Mediawiki.pm view on Meta::CPAN
my $dbh = $self->{_dbh};
$node = $dbh->quote ($node);
my $sql = "SELECT GET_LOCK($node, 10)";
my $sth = $dbh->prepare($sql);
$sth->execute or croak $dbh->errstr;
my $locked = $sth->fetchrow_array;
$sth->finish;
return $locked;
}
# Returns 1 if we can unlock, 0 if we can't, croaks on error.
sub _unlock_node {
my ($self, $node) = @_;
my $dbh = $self->{_dbh};
$node = $dbh->quote($node);
my $sql = "SELECT RELEASE_LOCK($node)";
my $sth = $dbh->prepare($sql);
$sth->execute or croak $dbh->errstr;
my $unlocked = $sth->fetchrow_array;
$sth->finish;
return $unlocked;
}
our @namespaces = qw{Talk User User_talk Project Project_talk Image Image_talk
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Wiki.pm view on Meta::CPAN
Note that you can blank out a node without deleting it by passing the
empty string as $content, if you want to.
If you expect the node to already exist, you must supply a checksum,
and the node is write-locked until either your checksum has been
proved old, or your checksum has been accepted and your change
committed. If no checksum is supplied, and the node is found to
already exist and be nonempty, a conflict will be raised.
The first two parameters are mandatory, the others optional. If you
view all matches for this distribution
view release on metacpan or search on metacpan
HTML-pWiki/preformatted_text.wiki view on Meta::CPAN
Use .text extension for preformatted_text to be displayed inside
a <pre> region.
The edit screen asumes fixed blocked 80 characters per line.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Graph.pm view on Meta::CPAN
indicates the type of graph. Currently, only "points" and "bar" are available.
=item zoom_type I<string>
indicates the type of zoom used for bar graphs. The default is "vertical lock",
where the vertical bounds are fixed regardless of zoom factor. Both "unlocked"
modes allow the user to change the upper bound, but the "unlocked int" mode
restricts the upper bound to an integer value.
=item histogram_type I<string>
indicates the type of histogram zoom, either "fixed" or "variable". Fixed zoom
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CHI/Cascade.pm view on Meta::CPAN
sub target_computing {
my $trg_obj;
( $trg_obj = $_[0]->{target_chi}->get("t:$_[1]") )
? ( ( ${ $_[2] } = $trg_obj->ttl ), $trg_obj->locked ? 1 : 0 )
: 0;
}
sub target_is_actual {
my ( $self, $target, $actual_term ) = @_;
lib/CHI/Cascade.pm view on Meta::CPAN
sub target_lock {
my ( $self, $rule ) = @_;
my $target = $rule->target;
# If target is already locked - a return
return
if ( $self->target_locked( $rule ) );
my $trg_obj;
$trg_obj = CHI::Cascade::Target->new
unless ( ( $trg_obj = $self->{target_chi}->get("t:$target") ) );
lib/CHI/Cascade.pm view on Meta::CPAN
$trg_obj->touch;
$self->{target_chi}->set( "t:$target", $trg_obj, $self->find( $target )->target_expires( $trg_obj ) );
}
}
sub target_locked {
my ( $self, $rule ) = @_;
exists $rule->{run_instance}{target_locks}{ $rule->target };
}
lib/CHI/Cascade.pm view on Meta::CPAN
};
$self->target_lock($rule)
if ! $self->target_time($target);
$should_be_recomputed = $self->target_locked($rule);
if ( defined $ttl && $ttl > 0 && ! $should_be_recomputed ) {
$ret_state = CASCADE_TTL_INVOLVED;
$run_instance->{ttl} = $ttl;
}
lib/CHI/Cascade.pm view on Meta::CPAN
$self->target_start_ttl( $rule, $min_start_time );
$run_instance->{ttl} = $min_start_time + $rule_ttl - Time::HiRes::time;
}
}
if ( $self->target_locked($rule) ) {
# We should recompute this target
# So we should recompute values for other dependencies
foreach $dep_target (keys %dep_values) {
if ( ! defined $dep_values{$dep_target}->[1]
|| ! $dep_values{$dep_target}->[1]->is_value )
lib/CHI/Cascade.pm view on Meta::CPAN
}
}
}
return $self->recompute( $rule, $target, { map { $_ => $dep_values{$_}->[1]->value } keys %dep_values } )
if $self->target_locked($rule);
return CHI::Cascade::Value->new( state => $ret_state );
};
pop @{ $run_instance->{target_stack} };
my $e = $@;
if ( $self->target_locked($rule) ) {
$self->target_unlock( $rule, $ret );
}
elsif ( $run_instance->{run_opts}{actual_term} && ! $only_from_cache && $run_instance->{orig_target} eq $target ) {
$self->target_actual_stamp( $rule, $ret );
}
lib/CHI/Cascade.pm view on Meta::CPAN
=item busy_lock
B<Optional>. Default is I<never>. I<This is not C<busy_lock> option of CHI!>
This is amount of time (to see L<CHI/"DURATION EXPRESSIONS">) until all target
locks expire. When a target is to being computing it is locked. If process which
is to be computing target and it will die or OS will be hangs up we can dead
locks and locked target will never recomputed again. This option helps to avoid
it. You can set up a special busy_lock for rules too.
=item target_chi
B<Optional>. This is CHI cache for target markers. Default value is value of
lib/CHI/Cascade.pm view on Meta::CPAN
=item busy_lock
B<Optional>. Default is L</busy_lock> of constructor or I<never> if first is not
defined. I<This is not C<busy_lock> option of CHI!> This is amount of time (to
see L<CHI/"DURATION EXPRESSIONS">) until target lock expires. When a target is
to being computed it is locked. If process which to be recomputing a target and
it will die or OS will be hangs up we can dead locks and locked target will
never recomputed again. This option helps to avoid it.
=item recomputed
B<Optional>. This is a computational callback (coderef). If target of this rule
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CHI/Driver/SharedMem.pm view on Meta::CPAN
};
}
# Internal routines
# The area must be locked by the caller
sub _build_shm {
my $self = shift;
my $shm_size = $self->shm_size();
if((!defined($shm_size)) || ($shm_size == 0)) {
lib/CHI/Driver/SharedMem.pm view on Meta::CPAN
flock($lock, ($params{type} eq 'read') ? Fcntl::LOCK_SH : Fcntl::LOCK_EX);
} else {
# print $tulip 'lost lock ', $self->lock_file(), "\n";
croak('Lost lock: ', $self->lock_file());
}
# print $tulip "locked\n";
# close $tulip;
}
sub _unlock {
my $self = shift;
lib/CHI/Driver/SharedMem.pm view on Meta::CPAN
croak('Lost lock for unlock: ', $self->lock_file());
}
# close $tulip;
}
# The area must be locked by the caller
sub _data_size {
my($self, $value) = @_;
if(!$self->shm()) {
croak __PACKAGE__, ': panic: _data_size has lost the shared memory segment';
lib/CHI/Driver/SharedMem.pm view on Meta::CPAN
return 0;
}
return unpack('I', $size);
}
# The area must be locked by the caller
sub _data {
my($self, $h) = @_;
# open(my $tulip, '>>', '/tmp/tulip');
# print $tulip __LINE__, "\n";
view all matches for this distribution
view release on metacpan or search on metacpan
The Berkeley DB is used for storage of the allocations, in B-Tree format.
=item File::lockf
The allocations file is locked with lockf to avoid problems with NFS.
=back
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
easyxs/ppport.h view on Meta::CPAN
get_av|5.006000|5.003007|p
getc|5.003007||Viu
get_c_backtrace|5.021001||Vi
get_c_backtrace_dump|5.021001||V
get_context|5.006000|5.006000|nu
getc_unlocked|5.003007||Viu
get_cv|5.006000|5.003007|p
get_cvn_flags|5.009005|5.003007|p
get_cvs|5.011000|5.003007|p
getcwd_sv|5.007002|5.007002|
get_db_sub|||iu
easyxs/ppport.h view on Meta::CPAN
PERL_MALLOC_WRAP|5.009002|5.009002|Vn
PerlMem_calloc|5.006000||Viu
PerlMem_free|5.005000||Viu
PerlMem_free_lock|5.006000||Viu
PerlMem_get_lock|5.006000||Viu
PerlMem_is_locked|5.006000||Viu
PerlMem_malloc|5.005000||Viu
PERL_MEMORY_DEBUG_HEADER_SIZE|5.019009||Viu
PerlMemParse_calloc|5.006000||Viu
PerlMemParse_free|5.006000||Viu
PerlMemParse_free_lock|5.006000||Viu
PerlMemParse_get_lock|5.006000||Viu
PerlMemParse_is_locked|5.006000||Viu
PerlMemParse_malloc|5.006000||Viu
PerlMemParse_realloc|5.006000||Viu
PerlMem_realloc|5.005000||Viu
PerlMemShared_calloc|5.006000||Viu
PerlMemShared_free|5.006000||Viu
PerlMemShared_free_lock|5.006000||Viu
PerlMemShared_get_lock|5.006000||Viu
PerlMemShared_is_locked|5.006000||Viu
PerlMemShared_malloc|5.006000||Viu
PerlMemShared_realloc|5.006000||Viu
PERL_MG_UFUNC|5.007001||Viu
Perl_modf|5.006000|5.006000|n
PERL_MULTICONCAT_HEADER_SIZE|5.027006||Viu
easyxs/ppport.h view on Meta::CPAN
putc|5.003007||Viu
put_charclass_bitmap_innards|5.021004||Viu
put_charclass_bitmap_innards_common|5.023008||Viu
put_charclass_bitmap_innards_invlist|5.023008||Viu
put_code_point|5.021004||Viu
putc_unlocked|5.003007||Viu
putenv|5.005000||Viu
put_range|5.019009||Viu
putw|5.003007||Viu
pv_display|5.006000|5.003007|p
pv_escape|5.009004|5.003007|p
view all matches for this distribution
view release on metacpan or search on metacpan
omnithreads/shared/shared.pm view on Meta::CPAN
may get called multiple times, one for each thread's scope exit.
=item lock VARIABLE
C<lock> places a lock on a variable until the lock goes out of scope.
If the variable is locked by another thread, the C<lock> call will
block until it's available. C<lock> is recursive, so multiple calls
to C<lock> are safe -- the variable will remain locked until the
outermost lock on the variable goes out of scope.
If a container object, such as a hash or array, is locked, all the
elements of that container are not locked. For example, if a thread
does a C<lock @a>, any other thread doing a C<lock($a[12])> won't block.
C<lock> will traverse up references exactly I<one> level.
C<lock(\$a)> is equivalent to C<lock($a)>, while C<lock(\\$a)> is not.
omnithreads/shared/shared.pm view on Meta::CPAN
=item cond_wait VARIABLE
=item cond_wait CONDVAR, LOCKVAR
The C<cond_wait> function takes a B<locked> variable as a parameter,
unlocks the variable, and blocks until another thread does a
C<cond_signal> or C<cond_broadcast> for that same locked variable.
The variable that C<cond_wait> blocked on is relocked after the
C<cond_wait> is satisfied. If there are multiple threads
C<cond_wait>ing on the same variable, all but one will reblock waiting
to reacquire the lock on the variable. (So if you're only using
C<cond_wait> for synchronisation, give up the lock as soon as
possible). The two actions of unlocking the variable and entering the
blocked wait state are atomic, the two actions of exiting from the
blocked wait state and relocking the variable are not.
In its second form, C<cond_wait> takes a shared, B<unlocked> variable
followed by a shared, B<locked> variable. The second variable is
unlocked and thread execution suspended until another thread signals
the first variable.
It is important to note that the variable can be notified even if
no thread C<cond_signal> or C<cond_broadcast> on the variable.
It is therefore important to check the value of the variable and
omnithreads/shared/shared.pm view on Meta::CPAN
=item cond_timedwait VARIABLE, ABS_TIMEOUT
=item cond_timedwait CONDVAR, ABS_TIMEOUT, LOCKVAR
In its two-argument form, C<cond_timedwait> takes a B<locked> variable
and an absolute timeout as parameters, unlocks the variable, and blocks
until the timeout is reached or another thread signals the variable. A
false value is returned if the timeout is reached, and a true value
otherwise. In either case, the variable is re-locked upon return.
Like C<cond_wait>, this function may take a shared, B<locked> variable
as an additional parameter; in this case the first parameter is an
B<unlocked> condition variable protected by a distinct lock variable.
Again like C<cond_wait>, waking up and reacquiring the lock are not
atomic, and you should always check your desired condition after this
function returns. Since the timeout is an absolute value, however, it
does not have to be recalculated with each pass:
omnithreads/shared/shared.pm view on Meta::CPAN
}
# we got it if $ok, otherwise we timed out!
=item cond_signal VARIABLE
The C<cond_signal> function takes a B<locked> variable as a parameter
and unblocks one thread that's C<cond_wait>ing on that variable. If
more than one thread is blocked in a C<cond_wait> on that variable,
only one (and which one is indeterminate) will be unblocked.
If there are no threads blocked in a C<cond_wait> on the variable,
the signal is discarded. By always locking before signaling, you can
(with care), avoid signaling before another thread has entered cond_wait().
C<cond_signal> will normally generate a warning if you attempt to use it
on an unlocked variable. On the rare occasions where doing this may be
sensible, you can skip the warning with
{ no warnings 'threads'; cond_signal($foo) }
=item cond_broadcast VARIABLE
The C<cond_broadcast> function works similarly to C<cond_signal>.
C<cond_broadcast>, though, will unblock B<all> the threads that are
blocked in a C<cond_wait> on the locked variable, rather than only one.
=back
=head1 NOTES
view all matches for this distribution
view release on metacpan or search on metacpan
Change: 9a54655bca8df754dd7f1ae72e1e35eda3e1506f
Author: Alceu Rodrigues de Freitas Junior <glaswalk3r@yahoo.com.br>
Date : 2019-03-01 02:19:12 +0000
More distributions blocked
Change: bf34f45eeab33540c54bb4779e90eb7787d527a1
Author: Alceu Rodrigues de Freitas Junior <arfjunior@uolinc.com>
Date : 2019-01-31 23:39:05 +0000
Change: 0a303addbd35a78bcbf2b113ead150ca8086991b
Author: Alceu Rodrigues de Freitas Junior <glasswalk3r@yahoo.com.br>
Date : 2018-07-27 19:51:51 +0000
Updated list of blocked distros
Change: 515c675810e3626b23b0717fc91fe4aae6081ed9
Author: Alceu Rodrigues de Freitas Junior <arfreitas@cpan.org>
Date : 2018-07-22 11:25:46 +0000
Change: 32caab31457e48772319a78f929afbbd0b54e29a
Author: Alceu Rodrigues de Freitas Junior <glasswalk3r@yahoo.com.br>
Date : 2018-07-02 18:28:07 +0000
Added more distros to be blocked
Change: 10f8da9c3a3cdb1e6154f3d5102678f8f96c4a90
Author: Alceu Rodrigues de Freitas Junior <glasswalk3r@yahoo.com.br>
Date : 2018-06-28 00:47:39 +0000
Change: 6f3cff62011558b493a5244b3e15ffcf36856b8c
Author: Alceu Rodrigues de Freitas Junior <arfreitas@cpan.org>
Date : 2018-02-16 14:24:30 +0000
Added more distros to be blocked
Change: ca8735d97bf54cc1798ec81d260ca1606c25108b
Author: Alceu Rodrigues de Freitas Junior <arfreitas@cpan.org>
Date : 2018-02-15 19:34:45 +0000
Date : 2017-11-23 17:20:23 +0000
Added alias for minicpan
Added alias creation for minicpan to always be invoked with
CPAN::Mini::LatestDistVersion. Added more distributions to be blocked
from smoker.
Change: ca0d686e5f3b431d5182c766648c0ec30c4c7f75
Author: Alceu Rodrigues de Freitas Junior <arfreitas@cpan.org>
Date : 2017-11-20 18:47:31 +0000
Change: 5a2b8b126853dc62dcbc46bde483ffe2a4bb4028
Author: Alceu Rodrigues de Freitas Junior <arfreitas@cpan.org>
Date : 2017-11-16 15:24:33 +0000
More distributions blocked from smoking
Change: 8450f8946a311dbbaced40b31971ad374271cf42
Author: Alceu Rodrigues de Freitas Junior <arfreitas@cpan.org>
Date : 2017-11-14 19:34:06 +0000
Change: 90b957c3edf2af7bd821732d68005abd3becf60d
Author: Alceu Rodrigues de Freitas Junior <arfreitas@cpan.org>
Date : 2017-11-14 14:18:55 +0000
Added new distribution which are blocked to be tested on smoker
Change: 36373259f0a260a21e6737c3dfd4cba32027a605
Author: Alceu Rodrigues de Freitas Junior <arfreitas@cpan.org>
Date : 2017-11-14 08:25:25 +0000
Change: 6ef2bdd54c1a7bd7f32e19737af18e0c960057cf
Author: Alceu Rodrigues de Freitas Junior <arfreitas@cpan.org>
Date : 2017-04-04 19:55:15 +0000
Added two new distros to be blocked on CPAN Smoker
Change: 5718a04a4a1ed858b8359263bf740e3fe5bbf8d2
Author: Alceu Rodrigues de Freitas Junior <arfreitas@cpan.org>
Date : 2017-03-26 12:51:28 +0000
view all matches for this distribution
view release on metacpan or search on metacpan
examples/config.ini view on Meta::CPAN
cc_author=default:yes pass/na:no
edit_report=default:ask/no pass/na:no
email_from=DAGOLDEN <xdg@hyperbolic.net>
send_duplicates=no
send_report=default:ask/yes pass/na:yes
# specify an internal mail server if direct mail sending is blocked
smtp_server=mail.speakeasy.net
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CPAN/SQLite/META.pm view on Meta::CPAN
my $force = $args{force};
my $db_name = $CPAN::SQLite::db_name;
my $db = File::Spec->catfile($CPAN::Config->{cpan_home}, $db_name);
my $journal_file = $db . '-journal';
if (-e $journal_file) {
$CPAN::FrontEnd->mywarn('Database locked - cannot update.');
return;
}
my @args = ($^X, '-MCPAN::SQLite::META=setup,update,check', '-e');
if (-e $db && -s _) {
my $mtime_db = (stat(_))[9];
view all matches for this distribution
view release on metacpan or search on metacpan
t/30cpan_path.t view on Meta::CPAN
use warnings;
use Test::More;
# This tests attempts to load the maintainers file from cpan,
# which is blocked by cpantesters... which makes all its nice
# regression tests fail.
plan skip_all => "Running in cpantesters"
if $ENV{NO_NETWORK_TESTING};
plan tests => 4;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Labyrinth/Plugin/CPAN/Tester.pm view on Meta::CPAN
=over 4
=item CheckLock
Checks whether the specified user account is currently locked.
=item Lock
Tester has just registered on the site, lock the user profile until email is
confirmed.
lib/Labyrinth/Plugin/CPAN/Tester.pm view on Meta::CPAN
=cut
sub CheckLock {
my $userid = $tvars{'loginid'};
my @row = $dbi->GetQuery('hash','GetUserByID',$userid);
return if(@row && !$row[0]->{locked});
Labyrinth::Session::Logout();
$tvars{redirect} = '';
SetCommand('tester-locked');
}
sub Lock {
return unless RealmCheck('public','tester','admin');
my $userid = $cgiparams{'userid'};
view all matches for this distribution
view release on metacpan or search on metacpan
vhost/html/js/tiny_mce/langs/en.js view on Meta::CPAN
browse:"Browse",
class_name:"Class",
not_set:"-- Not set --",
clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?",
clipboard_no_support:"Currently not supported by your browser, use keyboard shortcuts instead.",
popup_blocked:"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.",
invalid_data:"Error: Invalid values entered, these are marked in red.",
more_colors:"More colors"
},
contextmenu:{
align:"Alignment",
view all matches for this distribution
view release on metacpan or search on metacpan
vhost/cgi-bin/templates/users/user-edit.html
vhost/cgi-bin/templates/users/user-failure.html
vhost/cgi-bin/templates/users/user-forgot.html
vhost/cgi-bin/templates/users/user-item.html
vhost/cgi-bin/templates/users/user-list.html
vhost/cgi-bin/templates/users/user-locked.html
vhost/cgi-bin/templates/users/user-login-author.html
vhost/cgi-bin/templates/users/user-login.html
vhost/cgi-bin/templates/users/user-login-tester.html
vhost/cgi-bin/templates/users/user-pass.html
vhost/cgi-bin/templates/users/user-registered.html
view all matches for this distribution
view release on metacpan or search on metacpan
vhost/html/js/tiny_mce/langs/en.js view on Meta::CPAN
browse:"Browse",
class_name:"Class",
not_set:"-- Not set --",
clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?",
clipboard_no_support:"Currently not supported by your browser, use keyboard shortcuts instead.",
popup_blocked:"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.",
invalid_data:"Error: Invalid values entered, these are marked in red.",
more_colors:"More colors"
},
contextmenu:{
align:"Alignment",
view all matches for this distribution
view release on metacpan or search on metacpan
vhost/cgi-bin/config/phrasebook.ini view on Meta::CPAN
# Wiki Pages
GetWikiPageVersion=SELECT * FROM wikipage WHERE pagename=? AND version=?
GetWikiPage=SELECT * FROM wikipage WHERE pagename=? ORDER BY version DESC LIMIT 1
SaveWikiPage=INSERT INTO wikipage (pagename,version,userid,comment,content,createdate) VALUES (?,?,?,?,?,?)
GetWikiHistory=SELECT w.pagename,w.version,w.createdate,w.comment,w.locked,u.* FROM wikipage AS w \
INNER JOIN users AS u ON w.userid=u.userid \
WHERE w.pagename=? ORDER BY w.version DESC
CheckWikiPage=SELECT version FROM wikipage WHERE pagename=? LIMIT 1
GetWikiIndex=SELECT * FROM wikiindex WHERE pagename=?
vhost/cgi-bin/config/phrasebook.ini view on Meta::CPAN
INNER JOIN users AS u ON w.userid=u.userid \
ORDER BY w.createdate DESC $limit
DeleteWikiPage=DELETE FROM wikipage WHERE version>? AND pagename=?
DeleteWikiPages=DELETE FROM wikipage WHERE pagename=?
DeleteWikiIndex=DELETE FROM wikiindex WHERE pagename=?
SetWikiLock=UPDATE wikipage SET locked=? WHERE pagename=?
WikiSearch=SELECT * FROM wikiindex AS x \
INNER JOIN wikipage AS w ON w.pagename=x.pagename AND w.version=x.version \
INNER JOIN users AS u ON w.userid=u.userid \
WHERE w.content LIKE ? \
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CPAN.pm view on Meta::CPAN
my $command_error = $@;
_unredirect;
my $reported_error;
if ($command_error) {
my $err = $command_error;
if (ref $err and $err->isa('CPAN::Exception::blocked_urllist')) {
$CPAN::Frontend->mywarn("Client not fully configured, please proceed with configuring.$err");
$reported_error = ref $err;
} else {
# I'd prefer never to arrive here and make all errors exception objects
if ($err =~ /\S/) {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/bundle/Module/CoreList.pm view on Meta::CPAN
'CPAN::DeferredCode' => '5.50',
'CPAN::Distribution' => '1.93',
'CPAN::Distroprefs' => '6',
'CPAN::Distrostatus' => '5.5',
'CPAN::Exception::RecursiveDependency'=> '5.5',
'CPAN::Exception::blocked_urllist'=> '1.0',
'CPAN::Exception::yaml_not_installed'=> '5.5',
'CPAN::FTP' => '5.5001',
'CPAN::FTP::netrc' => '1.00',
'CPAN::FirstTime' => '5.53',
'CPAN::HandleConfig' => '5.5',
inc/bundle/Module/CoreList.pm view on Meta::CPAN
'B' => '1.29',
'CPAN' => '1.9600',
'CPAN::Author' => '5.5001',
'CPAN::CacheMgr' => '5.5001',
'CPAN::Distribution' => '1.9602',
'CPAN::Exception::blocked_urllist'=> '1.001',
'CPAN::HTTP::Client' => '1.9600',
'CPAN::HTTP::Credentials'=> '1.9600',
'CPAN::Index' => '1.9600',
'CPAN::LWP::UserAgent' => '1.9600',
'CPAN::Mirrors' => '1.9600',
inc/bundle/Module/CoreList.pm view on Meta::CPAN
'CPAN::DeferredCode' => 'cpan',
'CPAN::Distribution' => 'cpan',
'CPAN::Distroprefs' => 'cpan',
'CPAN::Distrostatus' => 'cpan',
'CPAN::Exception::RecursiveDependency'=> 'cpan',
'CPAN::Exception::blocked_urllist'=> 'cpan',
'CPAN::Exception::yaml_not_installed'=> 'cpan',
'CPAN::Exception::yaml_process_error'=> 'cpan',
'CPAN::FTP' => 'cpan',
'CPAN::FTP::netrc' => 'cpan',
'CPAN::FirstTime' => 'cpan',
inc/bundle/Module/CoreList.pm view on Meta::CPAN
'CPAN::DeferredCode' => undef,
'CPAN::Distribution' => undef,
'CPAN::Distroprefs' => undef,
'CPAN::Distrostatus' => undef,
'CPAN::Exception::RecursiveDependency'=> undef,
'CPAN::Exception::blocked_urllist'=> undef,
'CPAN::Exception::yaml_not_installed'=> undef,
'CPAN::Exception::yaml_process_error'=> undef,
'CPAN::FTP' => undef,
'CPAN::FTP::netrc' => undef,
'CPAN::FirstTime' => undef,
view all matches for this distribution
view release on metacpan or search on metacpan
cpan-security-advisory.json view on Meta::CPAN
{"module2dist":{"Crypt::Perl::ASN1::Encodee":"Crypt-Perl","Dpkg::Vendor::Devuan":"Dpkg","Net::DNS::RR::SIG":"Net-DNS","Jifty::Config":"Jifty","Text::Wikispaces2Markdown":"MojoMojo","Net::Server::TiedHandle":"Net-Server","Imager::IO":"Imager","App::Re...
view all matches for this distribution
view release on metacpan or search on metacpan
include/boost/container/detail/mutex.hpp view on Meta::CPAN
#ifndef _M_AMD64
/* These are already defined on AMD64 builds */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
long __cdecl _InterlockedCompareExchange(long volatile *Dest, long Exchange, long Comp);
long __cdecl _InterlockedExchange(long volatile *Target, long Value);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* _M_AMD64 */
#pragma intrinsic (_InterlockedCompareExchange)
#pragma intrinsic (_InterlockedExchange)
#define interlockedcompareexchange _InterlockedCompareExchange
#define interlockedexchange _InterlockedExchange
#elif defined(WIN32) && defined(__GNUC__)
#define interlockedcompareexchange(a, b, c) __sync_val_compare_and_swap(a, c, b)
#define interlockedexchange __sync_lock_test_and_set
#endif /* Win32 */
/* First, define CAS_LOCK and CLEAR_LOCK on ints */
/* Note CAS_LOCK defined to return 0 on success */
include/boost/container/detail/mutex.hpp view on Meta::CPAN
#define BOOST_CONTAINER_CAS_LOCK(sl) boost_container_x86_cas_lock(sl)
#define BOOST_CONTAINER_CLEAR_LOCK(sl) boost_container_x86_clear_lock(sl)
#else /* Win32 MSC */
#define BOOST_CONTAINER_CAS_LOCK(sl) interlockedexchange((long volatile*)sl, (long)1)
#define BOOST_CONTAINER_CLEAR_LOCK(sl) interlockedexchange((long volatile*)sl, (long)0)
#endif
/* How to yield for a spin lock */
#define SPINS_PER_YIELD 63
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
view all matches for this distribution