From owner-freebsd-gnome@FreeBSD.ORG Fri Nov 5 17:33:15 2010 Return-Path: Delivered-To: gnome@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DE8C106566B; Fri, 5 Nov 2010 17:33:15 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 3DD458FC17; Fri, 5 Nov 2010 17:33:13 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA17293; Fri, 05 Nov 2010 19:33:08 +0200 (EET) (envelope-from avg@freebsd.org) Message-ID: <4CD43FD4.8010400@freebsd.org> Date: Fri, 05 Nov 2010 19:33:08 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.11) Gecko/20101021 Lightning/1.0b2 Thunderbird/3.1.5 MIME-Version: 1.0 To: Kevin Oberman References: <20101105161556.0AE311CC0F@ptavv.es.net> <4CD42F13.6020105@icyb.net.ua> <4CD43218.60205@freebsd.org> <4CD43DBA.1000308@freebsd.org> In-Reply-To: <4CD43DBA.1000308@freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: multipart/mixed; boundary="------------030002070703050801070800" Cc: gnome@freebsd.org, bug-followup@freebsd.org Subject: Re: ports/151725: sysutils/hal: hald fails to start with dbus-1.4 X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Nov 2010 17:33:15 -0000 This is a multi-part message in MIME format. --------------030002070703050801070800 Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit 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 --------------030002070703050801070800 Content-Type: text/plain; name="patch-hald-runner_runner.c" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch-hald-runner_runner.c" --- 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); --------------030002070703050801070800--