* amar-src/amar.c (amar_attr_add_data_fd_thread): Close the file
  descriptor when there is nothing more to read from.
* client-src/sendbackup.c (check_result): Fix a race bug. sendbackup
  do not always report the exit status of the application.
  Once amvmware close its socket, an immediate call to waitpid(-1,)
  might not trap it exited.
  The patch check all pid we forked until they exit (max 5 seconds),
  after that they are killed.


git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/trunk@6010 a8d146d6-cc15-0410-8900-af154a0219e0