This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug stdio/14504] New: fopencookie does not call the close callback on system cleanup
- From: "mvr at google dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Tue, 21 Aug 2012 20:36:15 +0000
- Subject: [Bug stdio/14504] New: fopencookie does not call the close callback on system cleanup
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=14504
Bug #: 14504
Summary: fopencookie does not call the close callback on system
cleanup
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: stdio
AssignedTo: unassigned@sourceware.org
ReportedBy: mvr@google.com
Classification: Unclassified
Whan a file opened with fopencookie is automatically closed on the process
exit, the close callback should be called.
Test code:
int cookie_close(void* cookie) {
printf("closing file %d\n", *(int*)cookie);
return 0;
}
cookie_io_functions_t fns = { NULL, NULL, NULL, cookie_close };
int mycookie = 42;
int main() {
FILE* f = fopencookie(&mycookie, "r", fns);
return 0;
}
Expected output: "closing file 42"
Actual output: empty
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.