Age | Commit message (Collapse) | Author |
|
function old new delta
run_nofork_applet 280 287 +7
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Run this in a "sh SCRIPT":
sha256sum /dev/null
echo END
sha256sum is a NOEXEC applet. It runs in a forked child. Then child exit()s.
By this time, entire script is read, and buffered in a FILE object
from fopen("SCRIPT"). But fgetc() did not consume entire input.
exit() lseeks back by -9 bytes, from <eof> to 'e' in 'echo'.
(this may be libc-specific).
This change of fd position *is shared with the parent*!
Now parent can read more, and it thinks there is another "echo END".
End result: two "echo END"s are run.
Fix this by _exit()ing instead.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
The getopt function in some C libraries wraps the option in single quotes
while others do not. Avoid the issue by running sed on the output and
strip all quotes.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
feature disable
|
|
function old new delta
run_list 1159 1214 +55
done_pipe 106 123 +17
done_command 86 98 +12
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 84/0) Total: 84 bytes
|
|
|
|
|
|
|
|
|
|
function old new delta
done_word 749 791 +42
run_list 1821 1859 +38
checkjobs 334 351 +17
done_pipe 61 74 +13
static.reserved_list 132 144 +12
initialize_context 53 45 -8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/1 up/down: 122/-8) Total: 114 bytes
|
|
hush: fix a case where none of pipe members could be started
because of fork failure
hush: rename functions: xxx_real -> xxx
hush: try to add a bit more of vfork-friendliness
hush: add rudimentary design docs
hush: add TODO (newly discovered bug with globbing)
|
|
|
|
|
|
|
|
hush: fix `process subst` (2 bugs)
NB: will delete and re-add hush_test in order to change file modes
|
|
hush: add testsuite infrastructure
|