Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / January 2005



Tip: Looking for answers? Try searching our database.

bidirectional popen

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Full Time Whiner - 21 Jan 2005 22:58 GMT
My jaguar man page states that POPEN can now be used bidirectionally.  
Yet when I try the "r+" mode ("w+" and "a+", for good measure), I just
get an error (invalid arg).

In looking around, I found <http://www.hmug.org/man/3/popen.html>, which
warned "Deprecated: Mac OS X < 10.3.x".  Does "deprecated" mean
"broken", in this case?

Does popen provide bidirectional capability in 10.3?

Is Apple just full of crap?
Eric Albert - 22 Jan 2005 05:18 GMT
> My jaguar man page states that POPEN can now be used bidirectionally.  
> Yet when I try the "r+" mode ("w+" and "a+", for good measure), I just
[quoted text clipped - 3 lines]
> warned "Deprecated: Mac OS X < 10.3.x".  Does "deprecated" mean
> "broken", in this case?

"Deprecated" in this case means "I have no idea where that web page came
from". :)  popen is part of POSIX.  Apple would be wrong to deprecate it
until a future POSIX standard does.  I can't see any sign on Mac OS X
that would imply that popen is deprecated.

> Does popen provide bidirectional capability in 10.3?

Probably.  What's your code?

-Eric

Signature

Eric Albert         ejalbert@cs.stanford.edu
http://outofcheese.org/

Michael Ash - 22 Jan 2005 08:53 GMT
> My jaguar man page states that POPEN can now be used bidirectionally.  
> Yet when I try the "r+" mode ("w+" and "a+", for good measure), I just
[quoted text clipped - 7 lines]
>
> Is Apple just full of crap?

This is a bug, although I don't know whether it qualifies as a bug in libc
or a documentation bug. If you look at the source code for Apple's libc,
there is *no* support for bidirectional popen whatsoever in the code.

I filed this as a bug with Apple with ID 3665139, and it's closed as a
duplicate.
Eric Albert - 22 Jan 2005 21:09 GMT
> > My jaguar man page states that POPEN can now be used bidirectionally.  
> > Yet when I try the "r+" mode ("w+" and "a+", for good measure), I just
[quoted text clipped - 14 lines]
> I filed this as a bug with Apple with ID 3665139, and it's closed as a
> duplicate.

If you grab a copy of the Libc source from the Tiger WWDC preview
(<http://www.opensource.apple.com/darwinsource/WWDC2004/>), you'll see
that popen has bidirectional support there.  In other words, it looks
like this has been fixed for Tiger.

-Eric

Signature

Eric Albert         ejalbert@cs.stanford.edu
http://outofcheese.org/

Michael Ash - 23 Jan 2005 11:38 GMT
>>[bidirection popen() doesn't work]
>> This is a bug, although I don't know whether it qualifies as a bug in libc
[quoted text clipped - 8 lines]
> that popen has bidirectional support there.  In other words, it looks
> like this has been fixed for Tiger.

Thanks for letting us know, that's good news. I was afraid they would
consider it a documentation bug and just "fix" the man page.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.