[patch] Distinguish between OOM and Key error
John (J5) Palmieri
johnp at redhat.com
Fri Sep 8 13:49:48 PDT 2006
On Fri, 2006-09-08 at 16:25 -0400, Havoc Pennington wrote:
> John (J5) Palmieri wrote:
> > diff -u -r1.45 activation.c
> > --- bus/activation.c 6 Sep 2006 00:14:06 -0000 1.45
> > +++ bus/activation.c 8 Sep 2006 18:05:50 -0000
> > @@ -285,7 +285,8 @@
> > if (!bus_desktop_file_get_string (desktop_file,
> > DBUS_SERVICE_SECTION,
> > DBUS_SERVICE_NAME,
> > - &name))
> > + &name,
> > + error))
> > {
> > dbus_set_error (error, DBUS_ERROR_FAILED,
> > "No \""DBUS_SERVICE_NAME"\" key in .service file\n");
> > @@ -295,7 +296,8 @@
> > if (!bus_desktop_file_get_string (desktop_file,
> > DBUS_SERVICE_SECTION,
> > DBUS_SERVICE_EXEC,
> > - &exec))
> > + &exec,
> > + error))
> > {
> > dbus_set_error (error, DBUS_ERROR_FAILED,
> > "No \""DBUS_SERVICE_EXEC"\" key in .service file\n");
>
> This looks like it sets a new FAILED error over the top of the error
> returned from bus_desktop_file_get_string, should just leave the error
> set by the invoked function (should _DBUS_ASSERT_ERROR_IS_SET I think)
Ya, I just missed taking out the dbus_set_error there.
> Then, should some code be checking whether the error is an OOM error or
> not? In principle on OOM the .service file should be retried later,
> while for a bad .service file it should never be retried.
Should we have a wait for memory call and then retry? Do we do this
indefinitely?
--
John (J5) Palmieri <johnp at redhat.com>
More information about the dbus
mailing list