From owner-freebsd-hackers@freebsd.org Mon Nov 16 00:55:21 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 6BB4CA30EA8 for ; Mon, 16 Nov 2015 00:55:21 +0000 (UTC) (envelope-from mark@heily.com) Received: from mail-ig0-x22e.google.com (mail-ig0-x22e.google.com [IPv6:2607:f8b0:4001:c05::22e]) (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 3F4EA19C3 for ; Mon, 16 Nov 2015 00:55:21 +0000 (UTC) (envelope-from mark@heily.com) Received: by igvg19 with SMTP id g19so65846614igv.1 for ; Sun, 15 Nov 2015 16:55:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heily_com.20150623.gappssmtp.com; s=20150623; h=mime-version:date:message-id:subject:from:to:content-type; bh=C2an87fG0Gg19W+jaHQDCNWkWC+hjUaf41vKUXy5qro=; b=H17fh6t94iDqJ0h/py5TZquIZk9Di8frz+frIx+k9kjCMaaHkmY/qo+5bsuQOYlrT6 WdyfjUBgkdZueefkWmol0BZSOeYF6/soVXGSjk/YzdZrts9Rb2hG0wVgbD3S3tw/X0FN qG5w/a0VFZQE0DsiVio5dRNFIV9KA2uc6pocnH5UIbJaDAA2OQWbhafx0Ra3hDeffYtq FKbdcIUUzANbOvGrICS1Tt42fCVOA8pbA3VDHcjouo/7M/lpuI+wVRYSBSEhL46GtGDi p0/sMhT7oKQmEjbhFXF4MAlgsnl+ZQ8E/l3GwJf8wh9udkjjuhqQgoGGazoCWqPGW5Vt BGRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=C2an87fG0Gg19W+jaHQDCNWkWC+hjUaf41vKUXy5qro=; b=H9LVCdIYd3nLDO1AtFgrvAvt4XlZDEwd5azLPUkVAtYifUVJH5YHxBPPtvEpR6NsbX VbbTJyeTcOO2FeDjdhYQyMc2di5uiPfMrSK66EFkN/3qfUQrr6x7NtcZ57dvSsV8vtJE Gv7HrVVodqn6nQcDj3w+GEk6JxiVi9gEU7GE8n1wDNxrWikOTktcvkWOTG3ZuFrcK9Cm 2jw3dH5hVPXaQYNWnX6ctQJ2EgRJwFd/qp7LwB/bSxRArh5ECXEJn/9zJh/qjpxBoIaM ttmj1T1swpZMrV0bRXfARi0DvopANWXvmDaFXIfJoITipIfyCcxSOPcCeu5tSY0NdZIQ qD6A== X-Gm-Message-State: ALoCoQkZK5uOBJ031oAE22UWw63ogRAf0svhEwRlMUN3ibt40UOuwp2K6YmXhN3JjOZ41bSjFrOL MIME-Version: 1.0 X-Received: by 10.50.136.226 with SMTP id qd2mr14459857igb.37.1447635320634; Sun, 15 Nov 2015 16:55:20 -0800 (PST) Received: by 10.79.84.199 with HTTP; Sun, 15 Nov 2015 16:55:20 -0800 (PST) X-Originating-IP: [71.70.169.30] Date: Sun, 15 Nov 2015 19:55:20 -0500 Message-ID: Subject: relaunchd: a portable clone of launchd From: Mark Heily To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 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 00:55:21 -0000 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=204240 [3] Example: http://kbeezie.com/freebsd-jail-single-ip/