bug-gnulib
[Top][All Lists]
Advanced

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

Re: popen binary mode patch


From: Bruce Korb
Subject: Re: popen binary mode patch
Date: Mon, 5 Apr 2010 13:56:43 -0700

On Mon, Apr 5, 2010 at 1:05 PM, Jim Meyering <address@hidden> wrote:
>>>> My philosophy is slightly different.  I prefer to go with whatever it is
>>>> that makes life easier for programming to multiple platforms.
>>>
>>> http://sources.redhat.com/bugzilla/show_bug.cgi?id=11312
>>
>> Unfortunately, Uli rejected it today.

> If there must be a module, I agree: POSIX-only popen users
> should not be impacted.
>
>> or is this a case where sharutils should just
>> get used to writing popen(,O_BINARY?"rb":"r")?
>
> However, this is so simple, I'd say it's not worth a module.

And also the write flavors of popen:  popen(xx,O_BINARY?"wb":"w")

Anyhow, messing with multiple flavors of modules completely defeats
the primary purpose of having popen silently ignore a 'b' in the mode.
The primary purpose would be to reduce the amount of stuff one has
to remember to get the job done. Rembering to code alternating
strings or remembering a special flavor of popen gnulib module amount
to pretty much the same thing.  More stuff to do correctly.

I have to say, though, the "I know what you want, but I won't
do it because you didn't ask for "r" mode the way I want you to"
error messages are the bain of one's programming existence.
I think it the wrong choice.  :(

Bottom line:  I agree it isn't worth a separate module.  It should
either be rolled into the one true popen module, reargued, or forgotten about.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]