Add `patient_writev()` function
This function wraps the `writev()` function to make it EINTR-aware.
We are going to use this function to send multiple structs in a single
call when dealing with event notifier captures.
This function also supports partial writes even though this should never
happen with event notifier notification. We assert that the data sent is less
then PIPE_BUF in size so to take advantage of the POSIX guarantee for
write atomicity as explained in pipe(7).
The implementation was inspired by this stackoverflow.com post:
https://stackoverflow.com/questions/
5853675/techniques-for-handling-short-reads-writes-with-scatter-gather
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ifd1def23f38ab95411fd4550858466451d0468ea