Re: [repost] Patch to make cpdup's stdout unbuffered
--Apple-Mail-11-1049073097
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed
On 08.06.2004, at 23:02, Chris Pressey wrote:
> The installer popen()'s "cpdup -vvv src dest" and it reads from this
> pipe to monitor cpdup's progress. Unfortunately, since cpdup's output
> is fully buffered, cpdup's progress can't be usefully measured this
> way.
> This patch simply gives us a way to make cpdup's output unbuffered, so
> we can get it through the pipe as cpdup generates it.
As I wrote some months ago: this is a thing a lot of programs could use
(sed, awk, grep etc IIRC)
Now, we could add a flag for every single program to write unbuffered
(linebuffered) output. Or we could do some (non-POSIX?) magic in libc
to get most of this just fixed by doing a env
LIBC_STDOUT_BUFFERING=line $program or whatever...
opinions about this?
cheers
simon
--
/"\
\ /
\ ASCII Ribbon Campaign
/ \ Against HTML Mail and News
--Apple-Mail-11-1049073097
content-type: application/pgp-signature; x-mac-type=70674453;
name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
iD8DBQFAxjDXr5S+dk6z85oRAnvPAKD+E42/jJihZ4dZhNw3q56+ESau4QCgrfo1
+OvJPJ6kcV1MgwovirEXZ2s=
=TvGe
-----END PGP SIGNATURE-----
--Apple-Mail-11-1049073097--
討論串 (同標題文章)
完整討論串 (本文為第 2 之 9 篇):