This is the mail archive of the
mailing list for the glibc project.
[Bug libc/15589] freopen would close oldfd even though oldfd is same as newfd
- From: "lizhijian at cn dot fujitsu.com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 06 Jun 2013 05:56:56 +0000
- Subject: [Bug libc/15589] freopen would close oldfd even though oldfd is same as newfd
- Auto-submitted: auto-generated
- References: <bug-15589-131 at http dot sourceware dot org/bugzilla/>
--- Comment #2 from lizhijian <lizhijian at cn dot fujitsu.com> ---
> # ./freopen-test
> [E+] freopen error(No such file or directory)
> [S+] stat return error(Bad file descriptor)
> [E+] freopen return error(No such file or directory)
sorry ,make some miss,forget to create testfile.
# touch file1 file2
test ouput as followsïglibc=2.16ï:
[S+] close stdin
[S+] stat return error(Bad file descriptor)
[E+] freopen return success, but the newfd was closed
You are receiving this mail because:
You are on the CC list for the bug.