Bug 171690 - Difference between write(2) and write(3p) pages
Difference between write(2) and write(3p) pages
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: man-pages (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ivana Varekova
Ben Levenson
Depends On:
Blocks: 187538
  Show dependency treegraph
Reported: 2005-10-25 06:44 EDT by Bastien Nocera
Modified: 2010-10-21 23:36 EDT (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2006-0321
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-05-10 18:15:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2006:0321 normal SHIPPED_LIVE man-pages bug fix update 2006-05-10 00:00:00 EDT

  None (edit)
Description Bastien Nocera 2005-10-25 06:44:41 EDT
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 18:15:17 EDT
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.


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