try to use send(,,MSG_NOSIGNAL) instead of write() wherever possible (which

will allow us to drop the SIGPIPE check). Cache the results of the last
write()/send() to make sure that we do not issue more than necessary system
calls.



git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1083 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2006-07-14 22:42:01 +00:00
parent 350a253dc5
commit 860be2e70b
17 changed files with 100 additions and 58 deletions

View file

@ -61,7 +61,7 @@ static int random_proper(void *ret_data, size_t length) {
if ((fd = open(*device, O_RDONLY)) >= 0) {
if ((r = pa_loop_read(fd, ret_data, length)) < 0 || (size_t) r != length)
if ((r = pa_loop_read(fd, ret_data, length, NULL)) < 0 || (size_t) r != length)
ret = -1;
close(fd);