Re: Spawn process without inheriting parent stdout, stdin
Re: Spawn process without inheriting parent stdout, stdin
- Subject: Re: Spawn process without inheriting parent stdout, stdin
- From: "Corey O'Connor" <email@hidden>
- Date: Fri, 30 Sep 2005 15:49:56 -0700
On 9/30/05, Corey O'Connor <email@hidden> wrote:
> I'm unfamiliar with using pipe's with the Foundation API, but here's a
> guess how:
>
> let thePipe = a NSPipe.
> let app3Task = the NSTask for App3
> [app3Task setStandardOutput: [thePipe fileHandleForWriting]]
>
> Then the parent process can read from App3's stdout using [thePipe
> fileHandleForReading]
Cancel that! Even easier apparantly:
let thePipe = a NSPipe.
let app3Task = the NSTask for App3
[app3Task setStandardOutput: thePipe] // note: does not pass the pipes
write file handle.
Then the parent process can just use [thePipe fileHandleForReading] to
read from the child-process' stdout.
--
-Corey O'Connor
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden