From owner-freebsd-hackers@freebsd.org Mon Nov 16 01:27:52 2015 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97034A2F54A for ; Mon, 16 Nov 2015 01:27:52 +0000 (UTC) (envelope-from mark@heily.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B32C1845 for ; Mon, 16 Nov 2015 01:27:52 +0000 (UTC) (envelope-from mark@heily.com) Received: by iofh3 with SMTP id h3so146035296iof.3 for ; Sun, 15 Nov 2015 17:27:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heily_com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=s2lJZBoXN3tr27pamm6H1Nk6iq7kb3sRoODSR+l5XsM=; b=n1tx/W1S9NfTh3r+sNN3bhU+xPUcwNaKZPa5EiiL/sbnW0ZQzrdXDa1MEoji+ROTVI 8mBIqnaHLSQAG47JD+Z/AHPOjkO+6UZvZuJ0IkL9ae4yLE3PpbLlYJSwagalXA1S3hCl JhCEa3hY6sYzxCvxWmtaWOjIpUxts0ofqz6z9Do2fPZt/xxqwVbhdv4223G+9JOL9cHz 81dtGxAgreiJHP0Ch4aUQjljw9WxgTZmz+XttEpLZXmETnkVdJaSMMOc9T30lqR9fXoS qns+yRSfNeyCyZMJCerSz6Eq1O0C8mBvuGNJevKrtF0P0nUD7YKW+5l5JBHT0BZrq6vk QoIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=s2lJZBoXN3tr27pamm6H1Nk6iq7kb3sRoODSR+l5XsM=; b=HQBihhzQH2zSH95lV4o5a4LDypifvtYeAQnMYe8dDoanR7L7eTm0f/i4SIAYclN+xP HLVwsbWLZaU2Js4Eg5L/kZ/Gw0vJm1E/fhoC2lS6JWRpybMWH1Y4UdxTacufRe63bBwn PMVtEPkVo5GJ1RjYnAyInzT5Tb0groWe+Q3hgf+H9DKvvTZ8m+Ti2Y3iP8kBCU9vKgsa JpDKKtkP+YTA+s2YjY11yY0jnWE2Dgl8JFFxsM2MFzCFgRt7Dnhhtm6EhTob+MqkuwQ6 68QC+Rf6e0gpOWjQgxgjzcublmRoUFL3hHuDFpucqHwa4T7JQzxAmI2lxO7+S8HYaSHi LHsQ== X-Gm-Message-State: ALoCoQlsKrsk5mSZvvMoKhM7vcGUd81GeGNyhBgyhAKf4bqxHFmV4htWqVDx1C6spLXwxeJ6PwvG MIME-Version: 1.0 X-Received: by 10.107.186.132 with SMTP id k126mr28382869iof.158.1447637271563; Sun, 15 Nov 2015 17:27:51 -0800 (PST) Received: by 10.79.84.199 with HTTP; Sun, 15 Nov 2015 17:27:51 -0800 (PST) X-Originating-IP: [71.70.169.30] In-Reply-To: <21B2B211-C52C-4202-BC5F-A190B9C12CD3@pcbsd.org> References: <21B2B211-C52C-4202-BC5F-A190B9C12CD3@pcbsd.org> Date: Sun, 15 Nov 2015 20:27:51 -0500 Message-ID: Subject: Re: relaunchd: a portable clone of launchd From: Mark Heily To: Joe Maloney Cc: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2015 01:27:52 -0000 On Sun, Nov 15, 2015 at 8:17 PM, Joe Maloney wrote: > Awesome. Thank you! I will definitely be trying this out. One question.= Are there any plans to convert this work over from json to UCL which Free= BSD uses for things like pkg? It is my understanding that UCL can parse js= on anyway, and is the preferred format for FreeBSD from what I can tell? > Yes, I do plan to migrate from JSON to UCL, and there's an open ticket in GitHub about it: https://github.com/mheily/relaunchd/issues/1 However, in terms of priority, it's not at the top of my list. Before rewriting the parser to use UCL, I'd like to finish implementing the missing functionality documented in the README: * unloading jobs via launchctl * cron functionality - StartInterval, StartCalendarInterval * file and directory watches - WatchPaths, QueueDirectories * restarting jobs if they crash - TimeOut, ExitTimeout, KeepAliveTimeout, ThrottleInterval * resource limits - SoftResourceLimits, HardResourceLimits * miscellaneous - LaunchOnlyOnce, inetdCompatibility, EnableGlobbing, RunAtLoad, Umask If anyone wants to help implement these missing pieces, or if you enjoy rewriting parsers and want to play around with UCL, let me know. > Joe Maloney > >> On Nov 15, 2015, at 6:55 PM, Mark Heily wrote: >> >> I've written a clone of the launchd framework found in Mac OS X [1]. >> It's called "relaunchd" and I would like to some help improving it and >> getting it added to the FreeBSD ports tree [2]. >> >> Here's the source code: >> >> https://github.com/mheily/relaunchd >> >> One of the coolest things I've been able to do with it is to use >> socket activation to launch an unmodified version of Apache inside of >> a jail, pass it a socket descriptor bound to port 80 from the primary >> network interface outside of the jail, and have it "just work" and >> start serving web content using the pre-existing socket descriptor. >> This eliminates the need to setup a cumbersome NAT and port forwarding >> mechanism for each jail [3]. >> >> This is a completely separate line of development from the work that >> the NextBSD folks are doing to port the published Apple source code >> for launchd and all of it's dependencies. >> >> I'd be happy to answer questions about relaunchd, and welcome >> contributions from anyone who wants to help make launchd on FreeBSD a >> reality. >> >> Regards, >> >> - Mark >> >> [1] https://en.wikipedia.org/wiki/Launchd >> [2] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D204240 >> [3] Example: http://kbeezie.com/freebsd-jail-single-ip/ >> _______________________________________________ >> freebsd-hackers@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.or= g" >