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>
This commit is contained in:
15
shell/hush_test/hush-misc/nommu3.tests
Executable file
15
shell/hush_test/hush-misc/nommu3.tests
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
func()
|
||||
{
|
||||
while read p; do echo "$p"; done
|
||||
}
|
||||
|
||||
pipe_to_func()
|
||||
{
|
||||
# We had a NOMMU bug which caused "echo Ok |" part ot be lost
|
||||
echo Ok | func
|
||||
}
|
||||
|
||||
pipe_to_func | cat
|
||||
echo $?
|
Reference in New Issue
Block a user