Re: [dev] execline shell

From: Kamil Cholewiński <harry666t_AT_gmail.com>
Date: Sun, 24 Apr 2016 16:38:42 +0200

On Sun, 24 Apr 2016, Greg Reagle <greg.reagle_AT_umbc.edu> wrote:
> On 04/23/2016 07:49 PM, rain1_AT_openmailbox.org wrote:
>> execline works on a different concept than regular shells:
>> http://skarnet.org/software/execline/grammar.html
>
> Execline looks interesting, but I don't quite comprehend it. How would
> a script such as the following be written in execline?

execline is not exactly a shell. It's supposed to facilitate "DJB-style"
command chaining, and focuses on little else.

Suppose you have a bunch utilities that each do exactly one thing, and
then 'execve(2)' the remainder of their arguments:

    setuser my_user program arg
    setgrp my_group program arg

You could freely chain such commands to modify the execution environment
for the final program:

    setuser my_user setgrp my_group program arg

If your script does nothing else (as is the case 99% of the time when
using daemontools[1] or runit[2]), /bin/sh is quite redundant.

[1]: https://cr.yp.to/daemontools.html
[2]: http://smarden.org/runit/

For that intent and purpose, I would call it perfectly suckless.

K.
Received on Sun Apr 24 2016 - 16:38:42 CEST

This archive was generated by hypermail 2.3.0 : Sun Apr 24 2016 - 16:48:11 CEST