This is the mail archive of the
glibc-bugs@sourceware.org
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/>
http://sourceware.org/bugzilla/show_bug.cgi?id=15589
--- 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ï:
# ./freopen-test
[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.