mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Jens Gustedt <jens.gustedt@inria.fr>
To: musl@lists.openwall.com
Subject: Re: Non-stub setvbuf
Date: Sun, 17 Jan 2016 12:32:49 +0100	[thread overview]
Message-ID: <1453030369.29168.6.camel@inria.fr> (raw)
In-Reply-To: <20160117110334.GK2016@debian>

[-- Attachment #1: Type: text/plain, Size: 1228 bytes --]

Am Sonntag, den 17.01.2016, 12:03 +0100 schrieb Markus Wichmann:
> On Sun, Jan 17, 2016 at 09:59:52AM +0100, Jens Gustedt wrote:
> > How about just using setvbuf as an indication that the user wants the
> > buffer to be scrubbed? And so just zero it?
> > 
> > I wouldn't expect setvbuf to be used in places that are performance
> > critical, so an additional memset shouldn't do much harm, I think.
> > 
> 
> That isn't the use everyone has for it. I routinely set stdout and stdin
> to line buffered in my programs, because glibc sets the buffering mode
> for these streams based on file type, and I want to be consistent in all
> cases. And those applications can be performance critical.
> 
> But then, I provide no buffer to these calls, so maybe differentiate on
> that?

Yes, sorry, I wasn't clear enough. This is what I meant, only scrub
buffers if the user provides a buffer argument.

Jens

-- 
:: INRIA Nancy Grand Est ::: Camus ::::::: ICube/ICPS :::
:: ::::::::::::::: office Strasbourg : +33 368854536   ::
:: :::::::::::::::::::::: gsm France : +33 651400183   ::
:: ::::::::::::::: gsm international : +49 15737185122 ::
:: http://icube-icps.unistra.fr/index.php/Jens_Gustedt ::




[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

      reply	other threads:[~2016-01-17 11:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-17  1:43 Rich Felker
2016-01-17  8:59 ` Jens Gustedt
2016-01-17 11:03   ` Markus Wichmann
2016-01-17 11:32     ` Jens Gustedt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1453030369.29168.6.camel@inria.fr \
    --to=jens.gustedt@inria.fr \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).