* fhandler.h (fhandler_base::has_ongoing_io): Declare new function.
* fhandler.cc (fhandler_base::has_ongoing_io): Define new function. (fhandler_base::read_overlapped): Use has_ongoing_io to avoid writing when handle has not completed last I/O. (fhandler_base::write_overlapped): Ditto. * select.cc (peek_pipe): Be more careful about accessing hEvent field from get_overlapped().
This commit is contained in:
@ -302,6 +302,7 @@ class fhandler_base
|
||||
virtual char const *ttyname () { return get_name (); }
|
||||
virtual void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
|
||||
virtual void __stdcall read_overlapped (void *ptr, size_t& len) __attribute__ ((regparm (3)));
|
||||
virtual bool __stdcall has_ongoing_io () __attribute__ ((regparm (1)));
|
||||
virtual int write (const void *ptr, size_t len);
|
||||
virtual int __stdcall write_overlapped (const void *ptr, size_t len);
|
||||
virtual ssize_t readv (const struct iovec *, int iovcnt, ssize_t tot = -1);
|
||||
|
Reference in New Issue
Block a user