summaryrefslogtreecommitdiff
path: root/sysutils/hal/files/patch-hald-runner_runner.c
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2010-11-09 06:12:05 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2010-11-09 06:12:05 +0000
commit18cd6aae93b534e669d5a7f8bde91915c67ed84e (patch)
tree05afedaa621a1425748f6c7ebf13cc06606c47e5 /sysutils/hal/files/patch-hald-runner_runner.c
parent- Update to 1.4.4 (diff)
Fix a potential race with helper processes terminating too quickly. When
this happens, hald dies. PR: 151725 Submitted by: avg
Diffstat (limited to 'sysutils/hal/files/patch-hald-runner_runner.c')
-rw-r--r--sysutils/hal/files/patch-hald-runner_runner.c11
1 files changed, 11 insertions, 0 deletions
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);