Re: e3 flavors

From: Albrecht Kleine (kleine@ak.sax.de)
Date: Sat Dec 09 2000 - 16:01:18 CET


Hi,

> > n=read(fd2[0],buf,20480);
> > // never got more than 4096 byte!
> >
> > How this is to change to pass data up to 1 MB to sed and vice versa
> > w/o blocking?
>
> linux kernel? 4096 byte seems to be the PAGE_SIZE. What is the
> syscall you are using? kmalloc or similar?

Just called "pipe".

> Why do not assume this more semplicist approach:
>
> 1. copy the buffer in a file, such /tmp/buffer
> 2. run sed on /tmp/buffer
> 3. reload the buffer?
>
> It is ugly, but do not use pipes or additional ram.

Agree, it is ugly in fact. AFAIK I need at least one pipe for capturing
sed-output because the sed man page doesn't mention a switch for an
output to a file. But a single read-pipe is easy to handle, reading 4096
byte in a loop until EOF.

At all I've never expected to run in _that_ kind of trouble.
Perhaps later I'll dive into that some more asking the kernel gurus
as Karl-Heinz suggested, but not _now_ . (Unfortunately I've already
wasted hours for that single simple dumb problem.)

>
> Michele
Cheers
Albrecht

---------------------------------------------------------------------
To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: mulinux-help@sunsite.auc.dk



This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:17 CET