• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: popen with r+
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: popen with r+


  • Subject: Re: popen with r+
  • From: Ian Lister <email@hidden>
  • Date: Wed, 21 Jun 2006 09:10:45 +1000 (EST)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: popen with r+
      • From: Markus Hitter <email@hidden>
References: 
 >popen with r+ (From: "matt jaffa" <email@hidden>)

  • Prev by Date: popen with r+
  • Next by Date: Re: popen with r+
  • Previous by thread: popen with r+
  • Next by thread: Re: popen with r+
  • Index(es):
    • Date
    • Thread