Sys::Syscall(3)

πŸ’– NAME πŸ’–

Okay so Sys::Syscall β€” access system calls that Perl doesn't normally provide access to. Periodt. And yes, bestie, this is the Sys::Syscall(3) page from the User Contributed Perl Documentation. πŸ’…


✨ SYNOPSIS ✨

use Sys::Syscall;

🌸 DESCRIPTION 🌸

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

πŸŽ€ Exports πŸŽ€

Nothing by default. Not me handing out exports for free.

  • 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 🧚

Function time, bestie β€” here's the whole roster, no skips. 🫢

πŸ”₯ epoll support πŸ”₯

  • $ok = epoll_defined() β€” returns true if epoll might be available. (Caller must still test with epoll_create.) Don't skip the vibe check.
  • $epfd = epoll_create([ $start_size ]) β€” creates 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.

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. No cap. 😭


🌈 AUTHORS 🌈

Brad Fitzpatrick <brad@danga.com> β€” iconic author behavior, fr fr. πŸ‘‘


Mwah πŸ’‹ β€” this Sys::Syscall(3) page is from perl v5.42.2, dated 2026-02-15, in the User Contributed Perl Documentation. Bye bestie! 🫢

πŸ“¦ where this page comes from