From pi@fa8.opsec.eu  Sun Apr 22 12:58:38 2012
Return-Path: <pi@fa8.opsec.eu>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id C4268106566C
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 22 Apr 2012 12:58:38 +0000 (UTC)
	(envelope-from pi@fa8.opsec.eu)
Received: from fa8.opsec.eu (fa8.opsec.eu [IPv6:2001:14f8:200:4::2])
	by mx1.freebsd.org (Postfix) with ESMTP id 811248FC0C
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 22 Apr 2012 12:58:38 +0000 (UTC)
Received: from pi by fa8.opsec.eu with local (Exim 4.77 (FreeBSD))
	(envelope-from <pi@fa8.opsec.eu>)
	id 1SLwNB-0009M4-L4
	for FreeBSD-gnats-submit@freebsd.org; Sun, 22 Apr 2012 14:58:37 +0200
Message-Id: <E1SLwNB-0009M4-L4@fa8.opsec.eu>
Date: Sun, 22 Apr 2012 14:58:37 +0200
From: Kurt Jaeger <fbsd-ports@opsec.eu>
Reply-To: Kurt Jaeger <fbsd-ports@opsec.eu>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: manpage pread(2) misses one error case (EBUSY)
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         167201
>Category:       docs
>Synopsis:       manpage pread(2) misses one error case (EBUSY)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    eadler
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 22 13:00:27 UTC 2012
>Closed-Date:    Tue Jun 05 05:16:50 UTC 2012
>Last-Modified:  Tue Jun 05 05:16:50 UTC 2012
>Originator:     Kurt Jaeger
>Release:        FreeBSD 8.3-RELEASE amd64
>Organization:
-
>Environment:
System: FreeBSD fa8.opsec.eu 8.3-RELEASE FreeBSD 8.3-RELEASE #0: Mon Apr 9 21:23:18 UTC 2012 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64


>Description:
	a call to pread might fail with EBUSY in certain cases,
	and that error is not in the man page.
>How-To-Repeat:
	ports/devel/strace uses pread and fails because of this
>Fix:

--- pread.2-orig	2012-04-22 14:52:55.000000000 +0200
+++ pread.2	2012-04-22 14:52:29.000000000 +0200
@@ -164,6 +164,8 @@
 points outside the allocated address space.
 .It Bq Er EIO
 An I/O error occurred while reading from the file system.
+.It Bq Er EBUSY
+Failed to read from a file, e.g. /proc/<pid>/regs while <pid> is not stopped
 .It Bq Er EINTR
 A read from a slow device
 (i.e.\& one that might block for an arbitrary amount of time)

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-doc->eadler 
Responsible-Changed-By: eadler 
Responsible-Changed-When: Sun Apr 22 13:28:13 UTC 2012 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=167201 
State-Changed-From-To: open->analyzed 
State-Changed-By: eadler 
State-Changed-When: Sun Apr 22 14:29:10 UTC 2012 
State-Changed-Why:  
awaiting approval 

http://www.freebsd.org/cgi/query-pr.cgi?pr=167201 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/167201: commit references a PR
Date: Sun, 29 Apr 2012 22:23:14 +0000 (UTC)

 Author: eadler
 Date: Sun Apr 29 22:23:00 2012
 New Revision: 234820
 URL: http://svn.freebsd.org/changeset/base/234820
 
 Log:
   pread(2) might fail with EBUSY, so document it
   
   PR:		docs/167201
   Submitted by:	Kurt Jaeger <fbsd-ports@opsec.eu>
   Approved by:	cperciva
   MFC after:	3 days
 
 Modified:
   head/lib/libc/sys/read.2
 
 Modified: head/lib/libc/sys/read.2
 ==============================================================================
 --- head/lib/libc/sys/read.2	Sun Apr 29 22:19:58 2012	(r234819)
 +++ head/lib/libc/sys/read.2	Sun Apr 29 22:23:00 2012	(r234820)
 @@ -164,6 +164,8 @@ argument
  points outside the allocated address space.
  .It Bq Er EIO
  An I/O error occurred while reading from the file system.
 +.It Bq Er EBUSY
 +Failed to read from a file, e.g. /proc/<pid>/regs while <pid> is not stopped
  .It Bq Er EINTR
  A read from a slow device
  (i.e.\& one that might block for an arbitrary amount of time)
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: analyzed->patched 
State-Changed-By: eadler 
State-Changed-When: Sun Apr 29 22:32:27 UTC 2012 
State-Changed-Why:  
committed in r234820 

http://www.freebsd.org/cgi/query-pr.cgi?pr=167201 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/167201: commit references a PR
Date: Sun,  6 May 2012 14:22:50 +0000 (UTC)

 Author: eadler
 Date: Sun May  6 14:22:30 2012
 New Revision: 235088
 URL: http://svn.freebsd.org/changeset/base/235088
 
 Log:
   MFC r234820:
   	 pread(2) might fail with EBUSY, so document it
   
   PR:		docs/167201
   Approved by:	cperciva (implicit)
 
 Modified:
   stable/9/lib/libc/sys/read.2
 Directory Properties:
   stable/9/lib/libc/   (props changed)
   stable/9/lib/libc/sys/   (props changed)
 
 Modified: stable/9/lib/libc/sys/read.2
 ==============================================================================
 --- stable/9/lib/libc/sys/read.2	Sun May  6 14:16:18 2012	(r235087)
 +++ stable/9/lib/libc/sys/read.2	Sun May  6 14:22:30 2012	(r235088)
 @@ -164,6 +164,8 @@ argument
  points outside the allocated address space.
  .It Bq Er EIO
  An I/O error occurred while reading from the file system.
 +.It Bq Er EBUSY
 +Failed to read from a file, e.g. /proc/<pid>/regs while <pid> is not stopped
  .It Bq Er EINTR
  A read from a slow device
  (i.e.\& one that might block for an arbitrary amount of time)
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/167201: commit references a PR
Date: Sun,  6 May 2012 14:23:15 +0000 (UTC)

 Author: eadler
 Date: Sun May  6 14:23:01 2012
 New Revision: 235089
 URL: http://svn.freebsd.org/changeset/base/235089
 
 Log:
   MFC r234820:
   	 pread(2) might fail with EBUSY, so document it
   
   PR:		docs/167201
   Approved by:	cperciva (implicit)
 
 Modified:
   stable/8/lib/libc/sys/read.2
 Directory Properties:
   stable/8/lib/libc/   (props changed)
   stable/8/lib/libc/sys/   (props changed)
 
 Modified: stable/8/lib/libc/sys/read.2
 ==============================================================================
 --- stable/8/lib/libc/sys/read.2	Sun May  6 14:22:30 2012	(r235088)
 +++ stable/8/lib/libc/sys/read.2	Sun May  6 14:23:01 2012	(r235089)
 @@ -164,6 +164,8 @@ argument
  points outside the allocated address space.
  .It Bq Er EIO
  An I/O error occurred while reading from the file system.
 +.It Bq Er EBUSY
 +Failed to read from a file, e.g. /proc/<pid>/regs while <pid> is not stopped
  .It Bq Er EINTR
  A read from a slow device
  (i.e.\& one that might block for an arbitrary amount of time)
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/167201: commit references a PR
Date: Sun,  6 May 2012 14:23:30 +0000 (UTC)

 Author: eadler
 Date: Sun May  6 14:23:19 2012
 New Revision: 235090
 URL: http://svn.freebsd.org/changeset/base/235090
 
 Log:
   MFC r234820:
   	 pread(2) might fail with EBUSY, so document it
   
   PR:		docs/167201
   Approved by:	cperciva (implicit)
 
 Modified:
   stable/7/lib/libc/sys/read.2
 Directory Properties:
   stable/7/lib/libc/   (props changed)
 
 Modified: stable/7/lib/libc/sys/read.2
 ==============================================================================
 --- stable/7/lib/libc/sys/read.2	Sun May  6 14:23:01 2012	(r235089)
 +++ stable/7/lib/libc/sys/read.2	Sun May  6 14:23:19 2012	(r235090)
 @@ -164,6 +164,8 @@ argument
  points outside the allocated address space.
  .It Bq Er EIO
  An I/O error occurred while reading from the file system.
 +.It Bq Er EBUSY
 +Failed to read from a file, e.g. /proc/<pid>/regs while <pid> is not stopped
  .It Bq Er EINTR
  A read from a slow device
  (i.e.\& one that might block for an arbitrary amount of time)
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: eadler 
State-Changed-When: Tue Jun 5 05:16:49 UTC 2012 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=167201 
>Unformatted:
