From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 23 06:08:03 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB13A3D0 for ; Thu, 23 Oct 2014 06:08:03 +0000 (UTC) Received: from mail.iXsystems.com (mail.ixsystems.com [12.229.62.4]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "*.ixsystems.com", Issuer "Go Daddy Secure Certification Authority" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9C21DDC9 for ; Thu, 23 Oct 2014 06:08:03 +0000 (UTC) Received: from localhost (mail.ixsystems.com [10.2.55.1]) by mail.iXsystems.com (Postfix) with ESMTP id ADB22882D4; Wed, 22 Oct 2014 23:08:02 -0700 (PDT) Received: from mail.iXsystems.com ([10.2.55.1]) by localhost (mail.ixsystems.com [10.2.55.1]) (maiad, port 10024) with ESMTP id 71212-09; Wed, 22 Oct 2014 23:08:02 -0700 (PDT) Received: from [10.20.30.117] (75-101-82-48.static.sonic.net [75.101.82.48]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.iXsystems.com (Postfix) with ESMTPSA id 8393A882D1; Wed, 22 Oct 2014 23:08:00 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) Subject: Re: nosh version 1.9 From: Jordan Hubbard In-Reply-To: <544878B4.1060804@mu.org> Date: Wed, 22 Oct 2014 23:07:58 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <3E97280E-D38A-4085-A4DD-03C181F47BF5@mail.turbofuzz.com> References: <54430B41.3010301@NTLWorld.com> <5443191E.5050208@mu.org> <34F30D28-DE9B-444F-885E-F438FEEA46EC@mu.org> <54482A5E.2050303@NTLWorld.com> <527291AC-C5E2-420C-B566-C051BA82CA84@turbofuzz.com> <544878B4.1060804@mu.org> To: Alfred Perlstein X-Mailer: Apple Mail (2.1990.1) Cc: freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Oct 2014 06:08:03 -0000 > On Oct 22, 2014, at 8:40 PM, Alfred Perlstein wrote: >=20 >> launchctl(1) does all the XML parsing and then passes the results to = launchd using its own custom IPC format. Was there some particular = reason you violently inserted the XML parsing directly into launchd = after the original architect(s) went to such pains to avoid such blatant = penitentiary experiences? :-) >>=20 > I could see the utility of that. One of our senior full stack devs = says that XML is "triggering" and that they wouldn't want to work on = such a system. Perhaps it's to keep web people out? Well, whatever the rationale the pfsense-forkers (that sounds dirty) = might have had, I think it=E2=80=99s fair to say that this is an = abstraction layer that would be easy to add back since it exists that = way in the original source code base, and I would certainly be happy to = see it done (it could be done via a socket and a -h argument = added to launchctl if =E2=80=9Csomething other than Mach ports=E2=80=9D = was the desired IPC mechanism and you even wanted to be able to drive a = remote launchd through its paces). Either way, it=E2=80=99s the = launchctl(1) command that ought to speak XML or YAML or any other = reasonably structured format people like. Not embedding it in launchd = is good for a lot more than architectural cleanliness. As far as Mach IPC is concerned, it=E2=80=99s so prevalent in OS X and = iOS largely because: A) It=E2=80=99s already there. B) The Mach port space confers certain security advantages (port rights, = bootstrap sets, security trailers on all IPC). C) It=E2=80=99s easy to create interfaces for it (MiG isn=E2=80=99t = pretty, but it=E2=80=99s more than you get with sockets). However, given that launchd starts up as pid 1 and can bind to a = suitably secure low-numbered port for IPC (making it correspondingly = harder to spoof launchctl) I don=E2=80=99t really see any reason, other = than code compatibility, not to use another IPC mechanism in FreeBSD. = I=E2=80=99d kind of like Mach ports in FreeBSD just to remove this final = barrier to compatibility for a wide range of software that would = otherwise cross the divide, but I also get that they=E2=80=99re a bit = retro. - Jordan