Project

General

Profile

Bug #8352

stat(2) man page needs to describe difference between stat() and fstat() when working on character special files

Added by Yuri Pankov over 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
manpage - manual pages
Start date:
2017-06-07
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

As regression introduced in #6866 (and fixed in #8108) has shown, the behavior of fstat() on character special files is counter-intuitive - one needs to fopen() first, and then use stat() to find the st_size.

Currently, stat(2) tries to mention that, but it really could be improved:

       st_size
                     For regular files, this is the address of the end of the
                     file. For block special or character special, this is not
                     defined. See also pipe(2).


Related issues

Related to illumos gate - Bug #6866: zdb -l should return non-zero if it fails to find any labelClosed2016-04-08

Actions
Related to illumos gate - Bug #8108: zdb -l fails to read labels 2 and 3Closed2017-04-25

Actions

History

#1

Updated by Yuri Pankov over 3 years ago

  • Related to Bug #6866: zdb -l should return non-zero if it fails to find any label added
#2

Updated by Yuri Pankov over 3 years ago

  • Related to Bug #8108: zdb -l fails to read labels 2 and 3 added

Also available in: Atom PDF