From 860be2e70b33ff5eeb9130f80c4b1c096a2a8f27 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 14 Jul 2006 22:42:01 +0000 Subject: 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 --- src/pulsecore/random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pulsecore/random.c') diff --git a/src/pulsecore/random.c b/src/pulsecore/random.c index 3d3357a5..684ead71 100644 --- a/src/pulsecore/random.c +++ b/src/pulsecore/random.c @@ -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); -- cgit