Date: Fri, 05 Nov 2010 19:33:08 +0200 From: Andriy Gapon <avg@freebsd.org> To: Kevin Oberman <oberman@es.net> Cc: gnome@freebsd.org, bug-followup@freebsd.org Subject: Re: ports/151725: sysutils/hal: hald fails to start with dbus-1.4 Message-ID: <4CD43FD4.8010400@freebsd.org> In-Reply-To: <4CD43DBA.1000308@freebsd.org> References: <20101105161556.0AE311CC0F@ptavv.es.net> <4CD42F13.6020105@icyb.net.ua> <4CD43218.60205@freebsd.org> <4CD43DBA.1000308@freebsd.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
on 05/11/2010 19:24 Andriy Gapon said the following:
> It looked like the issue was caused by the above write() call after a sufficiently
> quick child process had already exited.
The proper patch.
--- 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);
--
Andriy Gapon
[-- Attachment #2 --]
--- 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);
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CD43FD4.8010400>
