After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 536990 - updateiconcache.c: 'close ()' is redundant.
updateiconcache.c: 'close ()' is redundant.
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: [obsolete] stock-icons
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2008-06-06 15:12 UTC by Kazuki Iwamoto
Modified: 2008-06-07 04:20 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Kazuki Iwamoto 2008-06-06 15:12:34 UTC
Please describe the problem:
Please see the manpage of fdopen.
I quote an important part.

> The file descriptor is not dup'ed, and will be closed when the stream created by fdopen() is closed.

Steps to reproduce:
1. compile updateiconcache.c
2. run gtk-update-icon-cache

Actual results:
The file descriptor which was already closed will be closed doubly.
The program may be hung up.

Expected results:
delete 'close ()'.

Does this happen every time?
Revision 20167 or later.
GTK+-2.12.10

Other information:
Comment 1 Tor Lillqvist 2008-06-07 04:20:57 UTC
Thanks, fixed in trunk and gtk-2-12:

2008-06-07  Tor Lillqvist  <tml@novell.com>

	Bug 536990 - updateiconcache.c: 'close ()' is redundant

	* gtk/updateiconcache.c (build_cache): Drop redundant close()
	calls. fclose() on a fdopen()ed strema closes the underlying file
	descriptor.