Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756449AbbDORmV (ORCPT ); Wed, 15 Apr 2015 13:42:21 -0400 Received: from mail-qk0-f176.google.com ([209.85.220.176]:35759 "EHLO mail-qk0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932729AbbDORmL (ORCPT ); Wed, 15 Apr 2015 13:42:11 -0400 MIME-Version: 1.0 In-Reply-To: <20150415132037.25bd4418@gandalf.local.home> References: <20150415084812.GG16381@kroah.com> <552E28C2.8070409@nod.at> <20150415092034.GA17680@kroah.com> <20150415092149.GB2310@pd.tnic> <20150415092713.GA17898@kroah.com> <20150415094410.GB2282@pd.tnic> <20150415114036.GB19274@kroah.com> <20150415154153.GD6801@home.goodmis.org> <20150415164033.GB25105@kroah.com> <20150415132037.25bd4418@gandalf.local.home> From: Havoc Pennington Date: Wed, 15 Apr 2015 13:41:10 -0400 X-Google-Sender-Auth: ZuAmF3cZId-1l5yw-hwdDC8riOs Message-ID: Subject: Re: [GIT PULL] kdbus for 4.1-rc1 To: Steven Rostedt Cc: Greg Kroah-Hartman , Borislav Petkov , Richard Weinberger , Andy Lutomirski , Al Viro , "Eric W. Biederman" , Linus Torvalds , Andrew Morton , Arnd Bergmann , One Thousand Gnomes , Tom Gundersen , Jiri Kosina , "linux-kernel@vger.kernel.org" , Daniel Mack , David Herrmann , Djalal Harouni Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1425 Lines: 33 On Wed, Apr 15, 2015 at 1:20 PM, Steven Rostedt wrote: > I read a bit of the documentation, but not enough. I really need to sit > down and play with code. That's the way I learn and understand. > It might be useful for some of the current devs to post about the best APIs to play with these days - my old libdbus is pretty painful, compared to some of the newer stuff. gdbus nicely shows a callback-based way to handle owning a service, using a function like g_bus_own_name: https://developer.gnome.org/gio/stable/gio-Owning-Bus-Names.html#g-bus-own-name The callback-based approach means the library can handle reconnection/restart on behalf of the app. The flip side (the way you use rather than provide a service) looks similar: https://developer.gnome.org/gio/stable/gio-Watching-Bus-Names.html#g-bus-watch-name Here the library can deal with complexities of a service being restarted, the app only has to write the callbacks so they can be called more than once (with alternating appeared/vanished handlers). You can see in those API docs more of the ordering guarantees, in this case on callback invocation - less for apps to screw up. Havoc -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/