Hi Peter, On Wed, Mar 24, 2010 at 12:59:04PM +0100, Peter Warasin wrote: > There was an unlink() of that socket file before bind(), but it is > commented out. > Re-introducing it (what the attached patch does) fixes the problem, at > least for me. > > I wonder if there's a good reason why this has been commented out, and > if it can be unlink()'d safely, without side-effects?
Well, we cannot be sure that the socket file was created by some other instance of collectd before. So, since collectd is usually running with root privileges, we could possibly remove unrelated data. At the very least (imho), we should check if that file is a UNIX socket, and possibly (I'm not sure if that's possible [in a portable way]) check if the socket is not in use. If both of that is the case, we can be fairly sure that removing the file is safe. Cheers, Sebastian -- Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/ Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin
signature.asc
Description: Digital signature
_______________________________________________ collectd mailing list [email protected] http://mailman.verplant.org/listinfo/collectd
