http://bugzilla.novell.com/show_bug.cgi?id=530994
User charles@transmissionbt.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=530994#c1
--- Comment #1 from Charles Kerr 2009-08-14 07:09:10 MDT ---
Hi David,
Thanks for looking through the code and giving feedback. Code-level feedback
seems to be the scarcest kind around, so it's always nice to get this kind of
ticket.
In this particular case, though, I don't think that open() should be seen as a
resource leak. A lockfile is being implemented by opening an empty file and
calling fcntl + F_WRLCK on it. As usual with a lockfile, it persists during
the life of the process to prevent a second instance from starting up, so by
design the fd is left open until the process is closed.
If this is causing some resource tool to sound an alarm, I could put a close()
in there atexit. Otherwise I don't really see the benefit.
As an aside, looking through this code again I see that the gtk+ client is now
the only customer for this API call. Probably it should be moved into the gtk/
directory to reduce the size of the cli, daemon, and qt clients a little...
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.