NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/54435: reading TCP urgent data with MSG_OOB doesn't clear poll(2) status
The following reply was made to PR kern/54435; it has been noted by GNATS.
From: mlelstv%serpens.de@localhost (Michael van Elst)
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: kern/54435: reading TCP urgent data with MSG_OOB doesn't clear poll(2) status
Date: Sat, 3 Aug 2019 22:11:05 -0000 (UTC)
uwe%stderr.spb.ru@localhost (Valery Ushakov) writes:
> Except that this is not what happens, as far as I can tell. Consider
> the output from the test quoted in the PR:
Without error handling:
int mark;
char oob;
char buffer[BUFLEN];
while (1) {
/* check if we reached urgent data */
ioctl(sock, SIOCATMARK, &mark);
if (mark)
break;
/* consume stream */
(void) read(sock, buffer, sizeof(buffer));
}
recv(sock, &oob, 1, MSG_OOB);
--
--
Michael van Elst
Internet: mlelstv%serpens.de@localhost
"A potential Snark may lurk in every tree."
Home |
Main Index |
Thread Index |
Old Index