Bug 191261
Summary: | freopen with NULL as path argument | ||
---|---|---|---|
Product: | Documentation | Reporter: | Helmut Eller (eller.helmut) |
Component: | man-pages | Assignee: | documentation_man-pages (documentation_man-pages) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | mtk.manpages |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | Subsystem: | ||
Regression: | No | Bisected commit-id: |
Description
Helmut Eller
2016-12-27 18:44:18 UTC
Hello Helmut, I added the following text to the page: If the path argument is a null pointer, freopen() changes the mode of the stream to that specified in mode; that is, freopen() reopens the pathname that is associated with the stream. The specification for this behavior was added in the C99 standard, which says: In this case, the file descriptor associated with the stream need not be closed if the call to freopen() suc‐ ceeds. It is implementation-defined which changes of mode are permitted (if any), and under what circumstances. I'll close this bug now. Please reopen if you think anything more is required. Cheers, Michael |