From 9303cdd732e06063382fcc01ae0f7b95278fbba2 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 21 May 2008 22:42:01 +0000 Subject: add O_NOCTTY git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2471 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/pulsecore/random.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/pulsecore/random.c') diff --git a/src/pulsecore/random.c b/src/pulsecore/random.c index 87afebfa..6fe649c5 100644 --- a/src/pulsecore/random.c +++ b/src/pulsecore/random.c @@ -64,7 +64,11 @@ static int random_proper(void *ret_data, size_t length) { while (*device) { ret = 0; - if ((fd = open(*device, O_RDONLY)) >= 0) { + if ((fd = open(*device, O_RDONLY +#ifdef O_NOCTTY + | O_NOCTTY +#endif + )) >= 0) { if ((r = pa_loop_read(fd, ret_data, length, NULL)) < 0 || (size_t) r != length) ret = -1; -- cgit