IO::SigGuard - Signal protection for sysread/syswrite
IO::SigGuard::sysread( $fh, $buf, $size ); IO::SigGuard::sysread( $fh, $buf, $size, $offset ); IO::SigGuard::syswrite( $fh, $buf ); IO::SigGuard::syswrite( $fh, $buf, $len ); IO::SigGuard::syswrite( $fh, $buf, $len, $offset );
perldoc perlipc describes how Perl versions from 5.8.0 onward disable the OS’s SA_RESTART flag when installing Perl signal handlers.
perldoc perlipc
This module restores that pattern: it does an automatic restart when a signal interrupts an operation, so you can entirely avoid the generally-useless EINTR error when using sysread() and syswrite().
EINTR
sysread()
syswrite()
Other than that you’ll never see EINTR, then, and that there are no function prototypes used, this module’s functions exactly match Perl’s equivalent built-ins.
https://github.com/FGasper/p5-IO-SigGuard
Felipe Gasper (FELIPE)
… with special thanks to Mario Roy (MARIOROY) for extra testing and a few fixes/improvements.
Copyright 2017 by Gasper Software Consulting, LLC
This distribution is released under the same license as Perl.
To install IO::SigGuard, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IO::SigGuard
CPAN shell
perl -MCPAN -e shell install IO::SigGuard
For more information on module installation, please visit the detailed CPAN module installation guide.