• 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: Spawn process without inheriting parent stdout, stdin
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: Spawn process without inheriting parent stdout, stdin (From: Sherm Pendley <email@hidden>)
 >Re: Spawn process without inheriting parent stdout, stdin (From: "Matthew Jaffa" <email@hidden>)
 >Re: Spawn process without inheriting parent stdout, stdin (From: "Corey O'Connor" <email@hidden>)

  • Prev by Date: Re: Spawn process without inheriting parent stdout, stdin
  • Next by Date: Re: Spawn process without inheriting parent stdout, stdin
  • Previous by thread: Re: Spawn process without inheriting parent stdout, stdin
  • Next by thread: Re: Spawn process without inheriting parent stdout, stdin
  • Index(es):
    • Date
    • Thread