Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a65375c

Browse files
committed
Explain what os.read() returns at end of file.
This closes SF bug #550409. Applying to release21-maint & release22-maint.
1 parent 7938fab commit a65375c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Doc/lib/libos.tex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,9 @@ \subsection{File Descriptor Operations \label{os-fd-ops}}
471471

472472
\begin{funcdesc}{read}{fd, n}
473473
Read at most \var{n} bytes from file descriptor \var{fd}.
474-
Return a string containing the bytes read.
474+
Return a string containing the bytes read. If the end of the file
475+
referred to by \var{fd} has been reached, an empty string is
476+
returned.
475477
Availability: Macintosh, \UNIX, Windows.
476478

477479
Note: this function is intended for low-level I/O and must be applied

0 commit comments

Comments
 (0)