[klibc] [mips] pipe doesn't work in dash

H. Peter Anvin hpa at zytor.com
Sun Jan 8 14:01:20 PST 2006


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



More information about the klibc mailing list