Date: Wed, 22 Oct 2014 23:07:58 -0700 From: Jordan Hubbard <jkh@mail.turbofuzz.com> To: Alfred Perlstein <bright@mu.org> Cc: freebsd-hackers@freebsd.org Subject: Re: nosh version 1.9 Message-ID: <3E97280E-D38A-4085-A4DD-03C181F47BF5@mail.turbofuzz.com> In-Reply-To: <544878B4.1060804@mu.org> References: <54430B41.3010301@NTLWorld.com> <5443191E.5050208@mu.org> <CAJ-VmomhxAkmVpAv5M%2Bh2HiEGnzHuXoZRh=E3LEvcRqbkoJ-5Q@mail.gmail.com> <34F30D28-DE9B-444F-885E-F438FEEA46EC@mu.org> <CAKYr3zwFyOh0VuQew5XtzKCNe0sDe2qc_5Jg3g9hT8pE7SyhJA@mail.gmail.com> <54482A5E.2050303@NTLWorld.com> <E03E5E72-6A7E-4206-849D-FFBA35B683A0@turbofuzz.com> <CAKYr3zy%2BH3Fe8L4ZGOmOxzY3byWoOvirQfKeHqeajvR-YvJRVA@mail.gmail.com> <527291AC-C5E2-420C-B566-C051BA82CA84@turbofuzz.com> <544878B4.1060804@mu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Oct 22, 2014, at 8:40 PM, Alfred Perlstein <bright@mu.org> 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 <hostname> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E97280E-D38A-4085-A4DD-03C181F47BF5>