Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Nov 2010 17:40:08 GMT
From:      Andriy Gapon <avg@freebsd.org>
To:        gnome@FreeBSD.org
Subject:   Re: ports/151725: sysutils/hal: hald fails to start with dbus-1.4
Message-ID:  <201011051740.oA5He8Wl020116@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/151725; it has been noted by GNATS.

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
Date: Fri, 05 Nov 2010 19:33:08 +0200

 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011051740.oA5He8Wl020116>