1Sys::Syscall(3) User Contributed Perl Documentation Sys::Syscall(3)
2
3
4
6 Sys::Syscall - access system calls that Perl doesn't normally provide
7 access to
8
10 use Sys::Syscall;
11
13 Use epoll, sendfile, from Perl. Mostly Linux-only support now, but
14 more syscalls/OSes planned for future.
15
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
25 epoll support
26
27 $ok = epoll_defined()
28 Returns true if epoll might be available. (caller must still test
29 with epoll_create)
30
31 $epfd = epoll_create([ $start_size ])
32 Create a new epoll filedescriptor. Returns -1 if epoll isn't
33 available.
34
35 $rv = epoll_ctl($epfd, $op, $fd, $events)
36 See manpage for epoll_ctl
37
38 $count = epoll_wait($epfd, $max_events, $timeout, $arrayref)
39 See manpage for epoll_wait. $arrayref is an arrayref to be modi‐
40 fied with the items returned. The values put into $arrayref are
41 arrayrefs of [$fd, $state].
42
43 sendfile support
44
45 $ok = sendfile_defined()
46 Returns true if sendfile should work on this operating system.
47
48 $sent = sendfile($sock_fd, $file_fd, $max_send)
49 Sends up to $max_send bytes from $file_fd to $sock_fd. Returns
50 bytes actually sent, or -1 on error.
51
53 This module is Copyright (c) 2005, 2006 Six Apart, Ltd.
54
55 All rights reserved.
56
57 You may distribute under the terms of either the GNU General Public
58 License or the Artistic License, as specified in the Perl README file.
59 If you need more liberal licensing terms, please contact the main‐
60 tainer.
61
63 This is free software. IT COMES WITHOUT WARRANTY OF ANY KIND.
64
66 Brad Fitzpatrick <brad@danga.com>
67
68
69
70perl v5.8.8 2006-11-21 Sys::Syscall(3)