GithubHelp home page GithubHelp logo

bradfitz / sys-syscall Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 4.0 20 KB

Sys::Syscall -- access system calls that Perl doesn't normally provide access to

Home Page: http://search.cpan.org/dist/Sys-Syscall/lib/Sys/Syscall.pm

Perl 99.69% Perl 6 0.31%

sys-syscall's Introduction

NAME

Sys::Syscall - access system calls that Perl doesn't normally provide access to

SYNOPSIS

use Sys::Syscall;

DESCRIPTION

Use epoll, sendfile, from Perl. Mostly Linux-only support now, but more syscalls/OSes planned for future.

Exports

Nothing by default.

May export: sendfile epoll_ctl epoll_create epoll_wait EPOLLIN EPOLLOUT EPOLLERR EPOLLHUP EPOLL_CTL_ADD EPOLL_CTL_DEL EPOLL_CTL_MOD

Export tags: :epoll and :sendfile

Functions

epoll support

$ok = epoll_defined()

Returns true if epoll might be available. (caller must still test with epoll_create)

$epfd = epoll_create([ $start_size ])

Create a new epoll filedescriptor. Returns -1 if epoll isn't available.

$rv = epoll_ctl($epfd, $op, $fd, $events)

See manpage for epoll_ctl

$count = epoll_wait($epfd, $max_events, $timeout, $arrayref)

See manpage for epoll_wait. $arrayref is an arrayref to be modified with the items returned. The values put into $arrayref are arrayrefs of [$fd, $state].

sendfile support

$ok = sendfile_defined()

Returns true if sendfile should work on this operating system.

$sent = sendfile($sock_fd, $file_fd, $max_send)

Sends up to $max_send bytes from $file_fd to $sock_fd. Returns bytes actually sent, or -1 on error.

COPYRIGHT

This module is Copyright (c) 2005 Six Apart, Ltd.

All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file. If you need more liberal licensing terms, please contact the maintainer.

Contributing

Want to contribute? See:

L<http://contributing.appspot.com/sys-syscall>

WARRANTY

This is free software. IT COMES WITHOUT WARRANTY OF ANY KIND.

AUTHORS

Brad Fitzpatrick <[email protected]>

sys-syscall's People

Contributors

bradfitz avatar dsteinbrunner avatar lkundrak avatar yselkowitz avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sys-syscall's Issues

Installing on Debian squeeze

Hi there,

Im trying to install it from cpanm with Perl 5.16.3 and im getting this error:

PERL_DL_NONLAZY=1 /root/perl5/perlbrew/perls/perl-5.16.3/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-use.t ....... ok

Failed test 'epoll_ctl udp socket EPOLLOUT'
at t/01-epoll.t line 32.
got: '-1'
expected: '0'

Failed test 'epoll_wait'
at t/01-epoll.t line 35.
got: '-1'
expected: '1'

Failed test 'got an array in our event'
at t/01-epoll.t line 37.

Failed test 'event is stdout'
at t/01-epoll.t line 39.
got: undef
expected: '3'

Failed test 'udp socket is writable'
at t/01-epoll.t line 40.
got: undef
expected: '4'

Failed test 'watch reads on udp socket'
at t/01-epoll.t line 42.
got: '-1'
expected: '0'

Failed test 'get no events'
at t/01-epoll.t line 45.
got: '-1'
expected: '0'

Failed test 'took a second'
at t/01-epoll.t line 47.
listening on 43401 and 33146

Failed test 'epoll_ctl listen socket writable'
at t/01-epoll.t line 77.
got: '-1'
expected: '0'
reason: Bad address

Failed test 'epoll_ctl listen2 socket writable'
at t/01-epoll.t line 78.
got: '-1'
expected: '0'
reason: Bad address

Failed test 'epoll_wait'
at t/01-epoll.t line 79.
got: '-1'
expected: '2'
Use of uninitialized value in concatenation (.) or string at t/01-epoll.t line 79.
Got (listen=4, listen2=5)
Use of uninitialized value in numeric eq (==) at t/01-epoll.t line 80.
Use of uninitialized value in numeric eq (==) at t/01-epoll.t line 80.

Is it a bug?¿ or many i need to install something....
Cheers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.