[PATCH] fix hald crash after attempt to unmount ignored volume.
Andrey Borzenkov
arvidjaar at mail.ru
Sat Jan 6 08:31:32 PST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Saturday 06 January 2007 15:37, Danny Kukawka wrote:
>
> Hm, only to be sure that I understand the problem correct: A programm that
> started by HAL and which use D-Bus can't write to stderr without write
> first a valid service name like 'org.freedesktop.Hal.Device*' for the D-Bus
> error name?
Strictly speaking, a method. What happens is
- - hald gets method invocation request
- - it starts external program (method handler). It does it indirectly, via
hald-runner, but this does not matter
- - if handler returns anything on stderr, it is interpreted as failure and
returned back to original caller as D-Bus error message. The first line of
output is taken to be official D-Bus error name (here is where it aborts in
case assertions are enabled) and the remaining lines - explanatory message.
> Sorry, but if this is correct, this is really strange and
> annoying for tools which write debug messages as many of the code in the
> tools directory.
>
A program that implements device method is expected to write to stderr only
when it returns an error. It is not expected to write anything else there. As
those handlers are not intended to be interactive anyway, may be this can be
changed to use stdout instead leaving stderr for "usual" debug logging.
> Correct me, if I'm wrong.
>
Me too :)
- -andrey
P.S. actually if assertion is disabled, nothing particular fatal happens.
D-Bus does not seem to check for valid error name (except for debugging
purposes) right now, so the first line is still returned as error name and
calling program won't be able to understand it and will treat as
some "generic error". But clean is it not.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
iD8DBQFFn87pR6LMutpd94wRAhaHAKCaMbFAYJ6MleaQO4FGu2ZUBR7tawCgypei
x4Bs9Kr9d2AGFj8N0YRaAFM=
=PllV
-----END PGP SIGNATURE-----
More information about the hal
mailing list