recv(2) has the following description for EAGAIN: [EAGAIN] The socket is marked non-blocking, and the receive operation would block, or a receive timeout had been set, and the timeout expired before data were received. Improper use of commas make the sentence difficult to comprehend, and the word "were" should be "was". Fix: Patch is below. Patch will also be available at the below URL once I receive a PR number: http://jdc.koitsu.org/freebsd/{prnum}/ How-To-Repeat: n/a
On Sun, Mar 10, 2013 at 12:20:13AM -0800, Jeremy Chadwick wrote: > > >Number: 176806 > >Category: docs > >Synopsis: recv(2) man page grammatical fixes [snip] > >Description: > recv(2) has the following description for EAGAIN: > > [EAGAIN] The socket is marked non-blocking, and the receive > operation would block, or a receive timeout had been > set, and the timeout expired before data were > received. > > Improper use of commas make the sentence difficult to comprehend, > and the word "were" should be "was". Hmm, are you really sure about the "were" part? I think it may have been used on purpose to indicate a counterfactual conditional - data *was not* received, although it was supposed (expected) to be. G'luck, Peter -- Peter Pentchev roam@ringlet.net roam@FreeBSD.org p.penchev@storpool.com PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13 "yields falsehood, when appended to its quotation." yields falsehood, when appended to its quotation.
The word "data" is plural of "datum", so yes, were is correct here. Chris
On Sun, Mar 10, 2013 at 04:12:05PM +0200, Peter Pentchev wrote: > On Sun, Mar 10, 2013 at 12:20:13AM -0800, Jeremy Chadwick wrote: > > > > >Number: 176806 > > >Category: docs > > >Synopsis: recv(2) man page grammatical fixes > [snip] > > >Description: > > recv(2) has the following description for EAGAIN: > > > > [EAGAIN] The socket is marked non-blocking, and the receive > > operation would block, or a receive timeout had been > > set, and the timeout expired before data were > > received. > > > > Improper use of commas make the sentence difficult to comprehend, > > and the word "were" should be "was". > > Hmm, are you really sure about the "were" part? I think it may have > been used on purpose to indicate a counterfactual conditional - data > *was not* received, although it was supposed (expected) to be. This is actually a good question and I appreciate you bringing it up. The more I worked on this, the more I kept pondering the possibility of "were" being correct in this context. Quite often if you repeat a sentence over and over you start to think it's grammatically correct when it might not be. English, sigh... An itemised list of what went through my head: - Singular vs. plural: "data" in this context is singular (yes, even though there may be multiple bytes of data :-) ), not plural. We tend to use "was" when referencing a single thing, and "were" when referencing multiple things, - Counterfactual condition: unsure if this applies here. Use of the word "before" might play a role, but I'm not entirely sure. Compound sentences can make this difficult (and also explains why removal of said commas is necessary), - English is an awful language often ridden with exceptions to the rule. With was/were, there are some cases where both forms are grammatically correct (based on the speaker's education level) -- and "were" is often preferred in this case, - Most of the online resources I've read on this matter continually cite "simple" sentence examples; "If I (was|were) a dog" does not apply, for example, because the sentence starts with the word "if". That is not the case here -- the condition is known (the timeout was reached before any I/O arrived on the fd/socket). This may be one inquire about at english.stackexchange.com. I would be very interested to know what's grammatically correct here, or if this is one of those nuance cases where "was" *or* "were" can be used. -- | Jeremy Chadwick jdc@koitsu.org | | UNIX Systems Administrator http://jdc.koitsu.org/ | | Mountain View, CA, US | | Making life hard for others since 1977. PGP 4BD6C0CB |
No. Plural; were. End of. Chris
A commit references this bug: Author: gavin Date: Wed Oct 15 23:39:48 UTC 2014 New revision: 273154 URL: https://svnweb.freebsd.org/changeset/base/273154 Log: Slightly improve grammar in EAGAIN description. PR: 176806 Submitted by: Jeremy Chadwick MFC after: 3 days Changes: head/lib/libc/sys/recv.2
Committed to head, will merge in a few days. Thanks!
Close PRs that have had a corresponding fix committed.