From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10c696,9bedf54b4be9359b X-Google-Attributes: gid10c696,public X-Google-Thread: 103376,9bedf54b4be9359b X-Google-Attributes: gid103376,public From: ak@muc.de Subject: Re: Buffered I/O with GNAT on Linux Date: 1998/06/14 Message-ID: #1/1 X-Deja-AN: 362527936 Sender: andi@fred.muc.de References: <3583B587.2DB4EDBC@cl.cam.ac.uk> Distribution: world Organization: [posted via] Leibniz-Rechenzentrum, Muenchen (Germany) Newsgroups: comp.lang.ada,comp.os.linux.development.apps Date: 1998-06-14T00:00:00+00:00 List-Id: dewar@merv.cs.nyu.edu (Robert Dewar) writes: > Markus comments on the buffering in GNAT. This is totally under control > of the user, as documented in the GNAT manual. THe default for a non-regular > file is buffering off, which is what most people want as a default! This looks like a lousy default. How about doing a isatty(1)[1] first like C stdio does? If it is a terminal turn buffering off (or turn it into line buffering), when it is no terminal turn it on. This would make writing unix-style filters in GNAT more efficient. -Andi [1] Actually glibc 2.0 under Linux does fstat(1, ..) and checks st_rdev, but that should be equivalent.