Re: CentOS 5 file system read only issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Aug 21, 2019, at 7:35 AM, Xinhuan Zheng <xzheng@xxxxxxxxxxxxxxxxx> wrote:
> 
> my $s = IO::Select->new( $fh );
> if ( $io->can_write( 10 ) {

That’s not designed to do what you hope.  select(2) is a system call intended for use on network socket handles, not file handles.  Since socket handles and file handles are compatible on a Unix type system (including CentOS) the call doesn’t fail, but it *cannot* report the information you’re hoping to get.

I would first try calling the -w operator:

   print_to_file() if -w $fh;
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]


  Powered by Linux