]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
truncate.2: ERRORS: ftruncate() can fail if the file descriptor is not writable
authorMichael Kerrisk <mtk.manpages@gmail.com>
Tue, 30 Jun 2015 09:57:40 +0000 (11:57 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Tue, 30 Jun 2015 09:57:40 +0000 (11:57 +0200)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/truncate.2

index 9bd57257dce30b71476003b0248a4167f7970088..5525e2ec507b2d4d80975b8433b1df0cc299fd63 100644 (file)
@@ -197,6 +197,15 @@ is not open for writing.
 .B EINVAL
 .I fd
 does not reference a regular file.
+.TP
+.BR EINVAL " or " EBADF
+The file descriptor 
+.I fd
+is not open for writing.
+POSIX permits, and portable applications should handle,
+either error for this case.
+(Linux produces
+.BR EINVAL .)
 .SH CONFORMING TO
 4.4BSD, SVr4, POSIX.1-2001 (these calls first appeared in 4.2BSD).
 .\" POSIX.1-1996 has