Bug 171690 - Difference between write(2) and write(3p) pages
Summary: Difference between write(2) and write(3p) pages
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: man-pages
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Ivana Varekova
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks: 187538
TreeView+ depends on / blocked
 
Reported: 2005-10-25 10:44 UTC by Bastien Nocera
Modified: 2018-10-19 18:59 UTC (History)
1 user (show)

Fixed In Version: RHBA-2006-0321
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-05-10 22:15:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2006:0321 0 normal SHIPPED_LIVE man-pages bug fix update 2006-05-10 04:00:00 UTC

Description Bastien Nocera 2005-10-25 10:44:41 UTC
In the man page for write(2), about writing 0 bytes, the page says:
If  count  is zero and the file descriptor refers to a
regular file, 0 will be returned without causing any other effect.

But in the POSIX man page write(3p):
Before  any  action  described below is taken, and if nbyte is zero and
the file is a regular file, the write() function may detect and  return
errors as described below.

In fact, RHEL4 behaves in the way mentioned by the POSIX man page (it will not
check for '0' count, and return an error if, for example, a file has a mandatory
lock on it).

So the write(2) page should say:
If  count  is zero and the file descriptor refers to a
regular file, 0 may be returned, or an error could be detected.

Comment 7 Red Hat Bugzilla 2006-05-10 22:15:17 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2006-0321.html



Note You need to log in before you can comment on or make changes to this bug.