1Sys::Syscall(3)       User Contributed Perl Documentation      Sys::Syscall(3)
2
3
4

NAME

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

SYNOPSIS

10         use Sys::Syscall;
11

DESCRIPTION

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

Exports

17       Nothing by default.
18
19       May export: sendfile epoll_ctl epoll_create epoll_wait EPOLLIN EPOLLOUT
20       EPOLLERR EPOLLHUP EPOLL_CTL_ADD  EPOLL_CTL_DEL EPOLL_CTL_MOD
21
22       Export tags:  :epoll and :sendfile
23

Functions

25   epoll support
26       $ok = epoll_defined()
27           Returns true if epoll might be available.  (caller must still test
28           with epoll_create)
29
30       $epfd = epoll_create([ $start_size ])
31           Create a new epoll filedescriptor.  Returns -1 if epoll isn't
32           available.
33
34       $rv = epoll_ctl($epfd, $op, $fd, $events)
35           See manpage for epoll_ctl
36
37       $count = epoll_wait($epfd, $max_events, $timeout, $arrayref)
38           See manpage for epoll_wait.  $arrayref is an arrayref to be
39           modified with the items returned.  The values put into $arrayref
40           are arrayrefs of [$fd, $state].
41
42   sendfile support
43       $ok = sendfile_defined()
44           Returns true if sendfile should work on this operating system.
45
46       $sent = sendfile($sock_fd, $file_fd, $max_send)
47           Sends up to $max_send bytes from $file_fd to $sock_fd.  Returns
48           bytes actually sent, or -1 on error.
49
51       This module is Copyright (c) 2005 Six Apart, Ltd.
52
53       All rights reserved.
54
55       You may distribute under the terms of either the GNU General Public
56       License or the Artistic License, as specified in the Perl README file.
57       If you need more liberal licensing terms, please contact the
58       maintainer.
59

Contributing

61       Want to contribute?  See:
62
63         L<http://contributing.appspot.com/sys-syscall>
64

WARRANTY

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

AUTHORS

69       Brad Fitzpatrick <brad@danga.com>
70
71
72
73perl v5.32.1                      2021-01-27                   Sys::Syscall(3)
Impressum