This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
"Christopher Faylor" <cgf@redhat.com> wrote: > Maybe I'm missing something but I don't think it has to be this complicated. > I think this should just be basically: > > bool > fhandler_socket::get_r_no_interrupt () > { > return winsock2_active; > } > > You don't have to worry about non_blocking or returning the base class > because you know that it is not intended to be called for the non_blocking > case and you know that sockets are "slow" devices. So I think this should > only be gated on whether we're lucky enough to be using winsock2. I realised that when I wrote it but I had some sort of aesthetic criteria reaction: like not relying on the caller to be doing the right thing; or, like making the change as precise as possible. Also if the setting of the NOEINTR flag is going to overridden completely like this, perhaps set_r_no_interrupt() ought to be virtual and overridden in fhandler_socket to generate an error, just in case someone one day calls that and expects it to have some effect? In other words, you're right and I'm just being my usual pedantic self :-) See attached. // Conrad
Attachment:
ChangeLog.txt
Description: Text document
Attachment:
get_r_no_interrupt.patch.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |