[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.16-test2-39-gf676391
Lennart Poettering
gitmailer-noreply at 0pointer.de
Fri Jul 24 09:21:52 PDT 2009
This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.
The master branch has been updated
from 5e24b6dff532ef82e028a78f020a826032493b2e (commit)
- Log -----------------------------------------------------------------
f676391 autospawn: refuse autospawning if process disabled waitpid()
-----------------------------------------------------------------------
Summary of changes:
src/pulse/context.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
-----------------------------------------------------------------------
commit f6763917ee757845e2c52e36975d948bc93d8b6e
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Jul 24 18:22:13 2009 +0200
autospawn: refuse autospawning if process disabled waitpid()
diff --git a/src/pulse/context.c b/src/pulse/context.c
index 4ded556..ab1c163 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
@@ -668,11 +668,24 @@ static pa_strlist *prepend_per_user(pa_strlist *l) {
static int context_autospawn(pa_context *c) {
pid_t pid;
int status, r;
-
- pa_log_debug("Trying to autospawn...");
+ struct sigaction sa;
pa_context_ref(c);
+ if (sigaction(SIGCHLD, NULL, &sa) < 0) {
+ pa_log_debug("sigaction() failed: %s", pa_cstrerror(errno));
+ pa_context_fail(c, PA_ERR_INTERNAL);
+ goto fail;
+ }
+
+ if ((sa.sa_flags & SA_NOCLDWAIT) || sa.sa_handler == SIG_IGN) {
+ pa_log_debug("Process disabled waitpid(), cannot autospawn.");
+ pa_context_fail(c, PA_ERR_CONNECTIONREFUSED);
+ goto fail;
+ }
+
+ pa_log_debug("Trying to autospawn...");
+
if (c->spawn_api.prefork)
c->spawn_api.prefork();
--
hooks/post-receive
PulseAudio Sound Server
More information about the pulseaudio-commits
mailing list