diff options
| author | Ron Yorston <rmy@pobox.com> | 2026-01-29 08:02:09 +0000 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2026-01-29 08:02:09 +0000 |
| commit | 4c41b562c07c20c6df03d0cda3e28bda3295ffba (patch) | |
| tree | 013247ade809929f9c581c05d9aca591b0778f4c /scripts/config/Makefile | |
| parent | 04eadd2f424f491b5c77f4a247dc0b6da3b9aef2 (diff) | |
| download | busybox-w32-4c41b562c07c20c6df03d0cda3e28bda3295ffba.tar.gz busybox-w32-4c41b562c07c20c6df03d0cda3e28bda3295ffba.tar.bz2 busybox-w32-4c41b562c07c20c6df03d0cda3e28bda3295ffba.zip | |
This didn't produce the expected output when run from ash:
ash -c "echo abc | sed s/a/x/" <&-
In general, if the last command in the pipe read from stdin the
command didn't work; if it read from file descriptor 0 (e.g. cat)
it did.
Closing a file descriptor caused the corresponding stream to
become invalid. For performance reasons the shell in busybox-w32
runs applets without an exec(), but that results in their seeing
the invalid stream from their parent.
Avoid the problem by calling exec() in such cases. This causes the
child process to get a new stdin stream initialised from the file
descriptor. The test also applies to stdout and stderr. There's
no discernable affect on performance when running the test suite.
Adds 64-96 bytes.
(GitHub issue #558)
Diffstat (limited to 'scripts/config/Makefile')
0 files changed, 0 insertions, 0 deletions
