1 I have fixed some bugs.
2 1. in build.sh, there was a leftover “false &”
3 that made the final wait behave as if a compilation job have failed;
4 2. eval() used to double the length of the buffer
5 each time it read a character, even if it was not full;
6 3. The eval child used to close the file descriptor used by minish-read
7 when minish was in interactive mode,
8 but it should have been doing so in script mode.
10 I think there is another bug in minish,
11 but I do not know how to trigger it.
12 If I type “a(/bin/cat)b” in minish,
13 I think cat could read b under some circumstances.
14 It is very hard, because minish-read reads fast and uses a buffer,
15 while eval() has to use execv() and only then it can read.
16 To fix this, minish eval() should read all the line
17 before starting the commands to be substituted.
19 If the line is fully read in advance,
20 then the reading phase is separated from the execution phase.
21 Therefore, when executing, eval() does not have to read anymore;
22 it would not matter if it did not know where to read from.
23 The reason I had for not having a separate minish-eval program
26 I have been thinking about how to bring minish-eval back.
27 I want minish-eval to be a program that treats its arguments
28 as if they were a line in a minish script.
29 “minish-eval␀a␀b” executes “a␀b”.
31 minish-eval can be used by minish.
32 The evaluator child of minish can read the output of minish-read,
33 put it in an argv, and execv() into minish-eval,
34 which should handle the rest, including command substitution.
39 https://unix.stackexchange.com/questions/118433/
40 https://www.cs.utah.edu/~elb/folklore/mel.html