collectd/collectd — pull request #827 by yogeswaran (2014-11-28 21:10:01+00:00)
Title: collectdctl command hangs on AIX and returns error 0 on Solaris.

Summary:
Problem: collectdctl command hangs on AIX and returns error 0 on Solaris.

Root cause - client (collectdctl) and server (collectd daemon) are using fprintf to communicate using Unix domain socket, Since fprintf buffers, command sent by client did not reach server, since client does not get the response, it closes the socket which forces the client to flush the command, now server receives the command, when responding, it gets socket error because the client already closed the socket.

Solution: Added flush after all fprintf calls.

Test Plan: Tested collectdctl on AIX and SunOS for listval, getval commands