On 04/05/2010 02:56 PM, Bruce Korb wrote: > And also the write flavors of popen: popen(xx,O_BINARY?"wb":"w") > > 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. :(
In cygwin 1.5, it made a difference. But now that cygwin 1.7 is out, pipes are binary only, so popen(xx,"r") and popen(xx,"rb") should be strictly equivalent (and you have to use the non-standard setmode() to get a text-mode pipe). So, it _might_ be enough to just use popen(xx,"r"), and get the right behavior after all, if you don't care about portability to older cygwin. -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature