From 18cd6aae93b534e669d5a7f8bde91915c67ed84e Mon Sep 17 00:00:00 2001 From: Joe Marcus Clarke Date: Tue, 9 Nov 2010 06:12:05 +0000 Subject: [PATCH] Fix a potential race with helper processes terminating too quickly. When this happens, hald dies. PR: 151725 Submitted by: avg --- sysutils/hal/Makefile | 2 +- sysutils/hal/files/patch-hald-runner_runner.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 sysutils/hal/files/patch-hald-runner_runner.c diff --git a/sysutils/hal/Makefile b/sysutils/hal/Makefile index 52a5324338cd..6fd3ce25d82e 100644 --- a/sysutils/hal/Makefile +++ b/sysutils/hal/Makefile @@ -8,7 +8,7 @@ PORTNAME= hal DISTVERSION= 0.5.14 -PORTREVISION= 9 +PORTREVISION= 10 CATEGORIES= sysutils MASTER_SITES= http://hal.freedesktop.org/releases/ diff --git a/sysutils/hal/files/patch-hald-runner_runner.c b/sysutils/hal/files/patch-hald-runner_runner.c new file mode 100644 index 000000000000..5b6c0043a5dd --- /dev/null +++ b/sysutils/hal/files/patch-hald-runner_runner.c @@ -0,0 +1,11 @@ +--- hald-runner/runner.c.orig 2010-11-05 19:26:05.673393765 +0200 ++++ hald-runner/runner.c 2010-11-05 19:26:33.471393058 +0200 +@@ -281,7 +281,7 @@ run_request_run (run_request *r, DBusCon + } + g_free (program_dir); + +- if (r->input) { ++ if (r->input && strlen(r->input) > 0) { + if (write(stdin_v, r->input, strlen(r->input)) != (ssize_t) strlen(r->input)) + printf("Warning: Error while writing r->input (%s) to stdin_v.\n", r->input); + close(stdin_v);