Re: popen with r+
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