libcgroup: check for return code of fprintf()
libcgroup: check for return code of fprintf()

From: Vivek Goyal <vgoyal@redhat.com>

o Adding a task to a particular cgroup currently does fprintf() and never
  check the return code. Modify it to check for the return code in case
  fprintf() and fflush() did not succeed. 

o I ran into the issues when i can't add migration thread to
  /container/admingroup/tasks and it will fail silently.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>


git-svn-id: 312abad21b46f471ee9c8bf93af65050a03353f9@133 4f4bb910-9a46-0410-90c8-c897d4f1cd53

rafalmiel/libcg,jrfastab/Linux-cgdcbxd,jrfastab/Linux-cgdcbxd,rafalmiel/libcg,rafalmiel/libcg,rafalmiel/libcg,jrfastab/Linux-cgdcbxd,jrfastab/Linux-cgdcbxd