Bug 176806 - recv(2) man page grammatical fixes
Summary: recv(2) man page grammatical fixes
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Books & Articles (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Gavin Atkinson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-10 08:30 UTC by Jeremy Chadwick
Modified: 2015-07-08 18:02 UTC (History)
0 users

See Also:
bugmeister: mfc-stable10?
bugmeister: mfc-stable9?
bugmeister: mfc-stable8?


Attachments
file.diff (651 bytes, patch)
2013-03-10 08:30 UTC, Jeremy Chadwick
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Chadwick 2013-03-10 08:30:00 UTC
	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
Comment 1 Peter Pentchev 2013-03-10 14:12:05 UTC
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.
Comment 2 Chris Rees 2013-03-10 15:42:17 UTC
The word "data" is plural of "datum", so yes, were is correct here.

Chris
Comment 3 Jeremy Chadwick 2013-03-10 17:52:01 UTC
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 |
Comment 4 Chris Rees 2013-03-10 18:08:06 UTC
No.  Plural; were.  End of.

Chris
Comment 5 commit-hook freebsd_committer freebsd_triage 2014-10-15 23:40:27 UTC
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
Comment 6 Gavin Atkinson freebsd_committer freebsd_triage 2014-10-15 23:41:33 UTC
Committed to head, will merge in a few days.  Thanks!
Comment 7 Glen Barber freebsd_committer freebsd_triage 2015-07-08 18:02:31 UTC
Close PRs that have had a corresponding fix committed.