Re: broken pipe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Wednesday, December 18, 2019 4:41 PM, Andy Pieters <arch-general@xxxxxxxxxxxxxxxxx> wrote:

> On Wed, 18 Dec 2019 at 15:32, Pascal via arch-general
> arch-general@xxxxxxxxxxxxx wrote:
>
> > that's awesome, it works !
> > it was so simple with cat taking over and consuming the data until the end !
> > (I added a redirect to /dev/null to cat)
> > big thank you.
>
> I'm interested in the amount of effort you put into this. Isn't the
> overhead of the pipes etc going to negate any memory/speed
> improvements you may get from only opening the file once or is there
> another consideration at play here?

IMHO, reading from memory is generally preferable to reading again from disk, that is, assuming a "worse" solution that would rely on multiple reads. It makes sure the data is actually the same data is transmitted and no other process writes to the file meanwhile. It's also easier to do than fiddling with flock() and the like. Also I'd advise against reading binary data into environment variables, which I think is what the approach with tee is supposed to solve, therefore I really like it. Technically you should be able to tee yourself into a full set of http headers.

cheers!
mar77i


Sent with ProtonMail Secure Email.




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux