Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: popen with r+



On Tue, 20 Jun 2006, matt jaffa wrote:
So I was very sad to learn that popen with r+ doesn't work on jaguar
and panther,

Really?

I tried looking at popen's source and doing the pipes and forks like
it does it but fdopen keeps returning EINVAL (22) not liking the "r+"
mode I send it. Here is my ldpopen method:

You can't open pdes[0] for writing, nor pdes[1] for reading. pipe() gives you a single, unidirectional pipe. If you need both input and output from your subprocess you'll need either two pipes or a bidirectional socket (see socketpair(2)).


Ian
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden
References: 
 >popen with r+ (From: "matt jaffa" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.