mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-09 02:29:07 +08:00
Cygwin: AF_UNIX: grab_admin_pkt: check for unread data in pipe
If there's unread data in the pipe from a previous partial read of a packet, just return. There can't be an administrative packet waiting to be read in that case.
This commit is contained in:
parent
3a6137eb3a
commit
abb6475a3b
@ -739,6 +739,9 @@ fhandler_socket_unix::grab_admin_pkt (bool peek)
|
||||
void *buffer = alloca (MAX_PATH);
|
||||
af_unix_pkt_hdr_t *packet;
|
||||
|
||||
if (get_unread ())
|
||||
/* There's data in the pipe from a previous partial read of a packet. */
|
||||
return 0;
|
||||
if (!(evt = create_event ()))
|
||||
return 0;
|
||||
if (peek)
|
||||
|
Loading…
x
Reference in New Issue
Block a user