failed to take into account that the library contains wrappers for read()
and write() that calls __libc_read() and __libc_write(). This incorrectly
causes normal read() and write() operations to be retried if aborted by a
signal.
Instead of making __libc_read() and __libc_write() retry if aborted by a
signal, add new functions __libc_safe_read() and __libc_safe_write() that
retries operation after a signal. Change reads from manager pipe and
writes to manager pipe to use __libc_safe_read() and __libc_safe_write().
the communication over the pthread manager pipe a little more robust by
retrying after EINTR failures. Without this fix, linuxthreads based
binaries that run fine on FreeBSD 4 starts crashing in mysterious ways
on FreeBSD 6.