Linux-Fanotify
view release on metacpan or search on metacpan
Fanotify.xs view on Meta::CPAN
int max
INIT:
struct fanotify_event_metadata *buf;
const struct fanotify_event_metadata *metadata;
struct fanotify_bundle *bundle;
ssize_t len;
int size;
int fd;
SV *event;
SV *eventref;
PPCODE:
/*
* Check arguments and allocate read buffer
*/
if (max < 1) {
max = 170; // Results in a buffer slightly smaller than 4k
}
if (max > 4096) { // 4096 results in an almost 100k buffer. Don't allow more.
Perl_croak(aTHX_ "Maximum buffer size exceeded (max = 4096)");
}
if (!notgrp2fd(notgrp, &fd)) {
( run in 0.431 second using v1.01-cache-2.11-cpan-5511b514fd6 )