NAME

IO::SigGuard - Signal protection for sysread/syswrite

SYNOPSIS

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 );

DESCRIPTION

perldoc perlipc describes how Perl versions from 5.8.0 onward disable the OS’s SA_RESTART flag when installing Perl signal handlers.

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().

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.

REPOSITORY

https://github.com/FGasper/p5-IO-SigGuard

AUTHOR

Felipe Gasper (FELIPE)

… with special thanks to Mario Roy (MARIOROY) for extra testing and a few fixes/improvements.

COPYRIGHT

Copyright 2017 by Gasper Software Consulting, LLC

LICENSE

This distribution is released under the same license as Perl.