Re: NSTask & NSPipe to perl script
Re: NSTask & NSPipe to perl script
- Subject: Re: NSTask & NSPipe to perl script
- From: "Pontus Ilbring" <email@hidden>
- Date: Wed, 31 Jan 2007 20:02:12 +0100
On 1/31/07, David Brennan <email@hidden> wrote:
Hi
I am trying to send text to a perl script, I want to apply regular
expressions to the text, then I use the result.
If all you want to do us use regular expressions then I think there
are Cocoa libraries for that.
I am using a pipe to send the text. I create the pipe, and the file
handle, and it works for small text strings.
When I try to pass the text from a 100 page PDF, it fails. Is there a
limit on the amount of data I send to a script, or am I just doing
something wrong?
I can't be sure without seeing the code, but yes, there are limits to
how much data can be in a pipe at the same time, and a full pipe will
simply block when you try to write to it. Which is why you have to
start the script before you start sending data through the pipe.
Otherwise the program will just block when the pipe fills up, waiting
for the not-yet-running script to empty it.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden