aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2015-09-04 06:22:10 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2015-09-04 06:22:10 +0200
commitb5be13ccd9ce2120468a381a5475955013c0f049 (patch)
treecf2b99e5a1fc91944dade4c72694f7704502d438 /shell/hush_test
parent2156e228537065f04e5f862e186421df0db36612 (diff)
downloadbusybox-w32-b5be13ccd9ce2120468a381a5475955013c0f049.tar.gz
busybox-w32-b5be13ccd9ce2120468a381a5475955013c0f049.tar.bz2
busybox-w32-b5be13ccd9ce2120468a381a5475955013c0f049.zip
hush: fix a nommu bug where a part of function body is lost if run in a pipe
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test')
-rw-r--r--shell/hush_test/hush-misc/nommu3.right2
-rwxr-xr-xshell/hush_test/hush-misc/nommu3.tests15
2 files changed, 17 insertions, 0 deletions
diff --git a/shell/hush_test/hush-misc/nommu3.right b/shell/hush_test/hush-misc/nommu3.right
new file mode 100644
index 000000000..da1534bef
--- /dev/null
+++ b/shell/hush_test/hush-misc/nommu3.right
@@ -0,0 +1,2 @@
1Ok
20
diff --git a/shell/hush_test/hush-misc/nommu3.tests b/shell/hush_test/hush-misc/nommu3.tests
new file mode 100755
index 000000000..0aca67a67
--- /dev/null
+++ b/shell/hush_test/hush-misc/nommu3.tests
@@ -0,0 +1,15 @@
1#!/bin/sh
2
3func()
4{
5 while read p; do echo "$p"; done
6}
7
8pipe_to_func()
9{
10 # We had a NOMMU bug which caused "echo Ok |" part ot be lost
11 echo Ok | func
12}
13
14pipe_to_func | cat
15echo $?