Re: Programm zu line buffered output zwingen?

From: Polytropon <freebsd(at)edvax.de>
Date: Fri, 17 Feb 2012 14:44:12 +0100

On Thu, 16 Feb 2012 06:37:24 +0100, Till Toenges wrote:
> Meine Frage ist nun, ob es eine Möglichkeit gibt, ein Programm zur
> zeilenweisen Ausgabe zu zwingen, so als ob es auf einem TTY läuft.

Vielleicht ist hier /usr/ports/misc/buffer hilfreich, wenn
Du es in den Pipe-Mechanismus einbauen kannst.

Aus der Paketbeschreibung:

This is a program designed initially to speed up writing tapes on remote
tape drives, but may be used as a general pipe buffering utility.
Note: You must have SYSVSHM support in FreeBSD kernel.

The program splits itself into two processes. The first process reads
(and reblocks) from stdin into a shared memory buffer. The second
writes from the shared memory buffer to stdout. Doing it this way
means that the writing side effectly sits in a tight write loop and
doesn't have to wait for input. Similarly for the input side. It is
this waiting that slows down other reblocking processes, like dd.

Ich kann mich daran erinnern, daß ich es vor vielen Jahren
im Rahmen einer Linux-Spielerei genutzt habe, bei der es
darum ging, MP3-Dateien auf QIC-80-Floppytapes als Musik-
kassetten zu mißbrauchen. :-)

-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Fri 17 Feb 2012 - 14:44:22 CET

search this site