From nobody Thu Sep 28 15:27:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxHRb47B5z4twWK; Thu, 28 Sep 2023 15:27:55 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxHRb3cGKz4GbV; Thu, 28 Sep 2023 15:27:55 +0000 (UTC) (envelope-from bapt@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695914875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=U3Q87xzEMRnnEx6CuYhStx8qLLCWsPy/u6TGYQp1sR8=; b=t/F6sNucg0U1Dk4pp8b2OULdoxRF8EQwmLoU0LmIil05XAzBRZ6sF0Pbl3wVj+F203f85c NrikOtppNS9oBJrvewpfmZsMBE/7BdmR3eBwPqVbqOeN3SEMS1DXAOxiWzDCO5ZNJisYWI ooO8hi7V6I35mBMPzX26V7M0ZX8LnGbdnZF7OvdOACf7bnP1Plw55W8wtuhbLBC88GoqKh jXhP0BYhcpwNuaNP7GFDcnXqoo7gLBp6VEQt9bn+090K4IY88tyimnwqba+1a2ZKxquh3W D3nacAwkJzMZbeNVIg/h0V0zGRjFwbh2JiSeaiFys8y92f/0zt0Ogmo0cqyluA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695914875; a=rsa-sha256; cv=none; b=G4n1eZQd7+M+ojVvB3jFf2ZUZZBX5P05FtJY0I8n6SKJc8VCqLIyvka1Szr1IRZwX/Mabg EeELKzNBe5y8wzJAATApQF4tY0kJDTGowDkGUmnlkul+x+OwtJGve9gCwXTJO5J4j2w249 oIFuiuUUVY9f3ej/MogeH86lsZQjt1SY+jonZqxajTuu3uA8Ol9vaZtIQbx0E+V2/lBjd1 fciCS3Uvig7KycnwiIQwi66vI0UKliCMJwYlyrKf8bbLiUZfa8MmUkQsaBo62DLqY7EpRD VD4eP2xL+tlcedSzP8rHrbqLeliIL0NaaEHXNqa6As/6qsbiKE8woJIT/ZQg0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695914875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=U3Q87xzEMRnnEx6CuYhStx8qLLCWsPy/u6TGYQp1sR8=; b=mFvrx8Thi5+b34i9SoIoUGO0XU0mxUtgEgENwTKGJYZjxW1BKauGdeQAYO+mibIWFdk8F4 b1v2F705hiSUSszP+Q0HAUJ4jEjrleFc5fdid9ob10fOXoz4rruNyf4elQQvC94PXvntWV elXvN+tzcdNMVCGZdygFOxTA/7lyPzNObXRYLiRTWYyNtbefF+o0R31eKeMe7BDlzo7APB +44VO8Ay1fnc8zH7M6Dp9rMStd/hW1Feb7mM0K7H5/WSwbg3z4XuhWxybZE52fcEAKx5gt Nc//Ngiv5JR0gDAlMWSd3fnkaoOPv1OTDB1YfvY2WYxGD/X7XV1fDwHx+XRfTA== Received: from aniel.nours.eu (nours.eu [IPv6:2001:41d0:8:3a4d::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RxHRb1wZdz9JP; Thu, 28 Sep 2023 15:27:55 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id 1663C16F94; Thu, 28 Sep 2023 17:27:52 +0200 (CEST) Date: Thu, 28 Sep 2023 17:27:52 +0200 From: Baptiste Daroussin To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1f31e00e19f9 - main - flua: add fbsd module Message-ID: References: <202309271400.38RE0s2R037013@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Sep 28, 2023 at 10:58:20AM -0400, Mark Johnston wrote: > On Wed, Sep 27, 2023 at 02:00:54PM +0000, Baptiste Daroussin wrote: > > The branch main has been updated by bapt: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=1f31e00e19f9e24d4c891a24973e08a027c4f71c > > > > commit 1f31e00e19f9e24d4c891a24973e08a027c4f71c > > Author: Baptiste Daroussin > > AuthorDate: 2023-09-13 07:43:33 +0000 > > Commit: Baptiste Daroussin > > CommitDate: 2023-09-27 14:00:00 +0000 > > > > flua: add fbsd module > > > > This module is bundled into flua, it only provides for now the exec > > function. The point of the function is to be able to execute a program > > without actually executing a shell. > > > > to use it: > > fbsd.exec({"id", "bapt"}) > > Hi Baptiste, > > How is this different from posix.unistd.exec in the luaposix module? > Wouldn't it be better to add this to the existing posix.unistd namespace > in lposix.c? exec does not seem FreeBSD-specific. This is more like os.execure without the invocation of /bin/sh! > > I have a related question: this week I wrote some FreeBSD-specific lua > modules wrapping some system calls like sysctl(2) and cap_enter(2). How > do we want to organize the flua namespace for such things? Should we > have a freebsd.sys namespace for system call wrappers? I would then put > bindings for FreeBSD libraries under freebsd.* or freebsd.lib.*, so we > could have freebsd.lib.procstat, for example. I am fine with a module named freebsd.lib.* I plan to add kenv, rcctl, procctl so, (I scratched sysctl and cap_enter has you have them ;) ) Bapt