Pipe doesn't work in dash on mips/mipsel - everything delivered to a pipe is shown on stdout: mipsel: $ echo foo | cat > ~/d foo <ctrl-c pressed manually> $ cat ~/d $ i386: $ echo foo | cat > ~/d $ cat ~/d foo $ This may be related to the following warnings during compilation but I'm not sure: klibc/arch/mips/syscall.S: Assembler messages: klibc/arch/mips/syscall.S:12: Warning: Macro instruction expanded into multiple instructions in a branch delay slot KLIBCCC dash/parser.o dash/parser.c: In function 'readtoken1': dash/parser.c:1272: warning: 'saveprompt' may be used uninitialized in this function dash/parser.c:849: warning: 'prevsyntax' may be used uninitialized in this function dash/parser.c:842: warning: variable 'quotef' might be clobbered by 'longjmp' or 'vfork' dash/parser.c:843: warning: variable 'dblquote' might be clobbered by 'longjmp' or 'vfork' dash/parser.c:844: warning: variable 'varnest' might be clobbered by 'longjmp' or 'vfork' dash/parser.c:845: warning: variable 'arinest' might be clobbered by 'longjmp' or 'vfork' dash/parser.c:846: warning: variable 'parenlevel' might be clobbered by 'longjmp' or 'vfork' dash/parser.c:847: warning: variable 'dqvarnest' might be clobbered by 'longjmp' or 'vfork' dash/parser.c:848: warning: variable 'oldstyle' might be clobbered by 'longjmp' or 'vfork' dash/parser.c:849: warning: variable 'prevsyntax' might be clobbered by 'longjmp' or 'vfork' dash/parser.c:1272: warning: variable 'saveprompt' might be clobbered by 'longjmp' or 'vfork' dash/parser.c:835: warning: argument 'syntax' might be clobbered by 'longjmp' or 'vfork' KLIBCCC dash/redir.o -- Martin Michlmayr http://www.cyrius.com/
Martin Michlmayr wrote:> Pipe doesn't work in dash on mips/mipsel - everything delivered to a > pipe is shown on stdout: > > mipsel: > $ echo foo | cat > ~/d > foo > <ctrl-c pressed manually> > $ cat ~/d > $ > > i386: > $ echo foo | cat > ~/d > $ cat ~/d > foo > $ > > This may be related to the following warnings during compilation but > I'm not sure: > > klibc/arch/mips/syscall.S: Assembler messages: > klibc/arch/mips/syscall.S:12: Warning: Macro instruction expanded into multiple instructions in a branch delay slot >This one is actually OK, although probably a bit ugly (we really should expand this out explicitly.) Unfortunately my MIPS box bit the dust; Ralf said at one point he'd try to get me a development board from Broadcom which never materialized; so I have absolutely no way to test any of this... pipe(2) is a weird system call on many architectures, due to attempts at staying binary compatible with various weird native-Unix hacks; on MIPS it's in special assembly code in arch/mips/pipe.S. -hpa
Martin Michlmayr wrote:> Pipe doesn't work in dash on mips/mipsel - everything delivered to a > pipe is shown on stdout:I think I've figured out the problem... in klibc/arch/mips/pipe.S, "(a1)" on line 10 should be "4(a0)". Could you try to make that change and see if it works? -hpa
Apparently Analagous Threads
- [klibc:update-dash] dash: parser: Add syntax stack for recursive parsing
- [klibc:update-dash] parser: Add syntax stack for recursive parsing
- latest dash compile warnings
- [klibc:update-dash] dash: parser: use pgetc_eatbnl() in more places
- [klibc:update-dash] parser: use pgetc_eatbnl() in more places