Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 06 Nov 2010 13:06:23 +0200
From:      Andriy Gapon <avg@freebsd.org>
To:        bug-followup@freebsd.org, Joe Marcus Clarke <marcus@freebsd.org>
Cc:        gnome@freebsd.org
Subject:   Re: ports/151725: sysutils/hal: hald fails to start with dbus-1.4
Message-ID:  <4CD536AF.8070601@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>

next in thread | previous in thread | raw e-mail | index | archive | help
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 problem could be that zero-sized write() into a closed pipe (after child's
exit) still generates SIGPIPE.

This is what POSIX have to say about this:
"If nbyte is zero and the file is not a regular file, the results are unspecified."

So hald code should take into account this possibility and not write anything
into the pipe unless it is sure that the child process does expect input (and
obviously it can't expect "null" input) and thus won't exit before the input is
fed to it.

-- 
Andriy Gapon



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