• 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: Interacting with an NSTask via pipes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Interacting with an NSTask via pipes


  • Subject: Re: Interacting with an NSTask via pipes
  • From: Tony Gray <email@hidden>
  • Date: Thu, 07 Feb 2002 17:31:04 +1100

> Tony,
>
>>>>>>> Tony Gray (TG) wrote at Wed, 06 Feb 2002 19:26:12 +1100:
> TG> If I remove that odd second line from the Perl script, things stop
> TG> working - my controller's "appendOutput:" method never gets called. In my
> TG> Perl sample, I can fix this by leaving the second line in, but for my
> TG> "real" project, I need to talk to a precompiled program that I don't have
> TG> the source code for, and it's not flushing the buffer before waiting for
> TG> input.
>
> So far as I know, there's no solution: if the program decides to send data
> to you in some moment, you have absolutely no way (*) to make it to send them
> earlier. That seems quite logical, and quite independent of whether the
> program achieves that goal by, say, programmatically collecting all output
> and writing it out in one big chunk later, or by buffering.

What I find particularly difficult to fathom is why my perl script (with
buffering turned on) and the process I eventually hope to drive work
properly from a shell, but as soon as I try to drive them as as NSTask, the
buffering changes their behaviour completely. It's like the shell is able
to force a buffer flush as well.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Interacting with an NSTask via pipes
      • From: Ingvar Nedrebo <email@hidden>
  • Prev by Date: Re: determining availability of a given glyph via NSFont
  • Next by Date: Re: socko2: kill process by name
  • Previous by thread: Interacting with an NSTask via pipes
  • Next by thread: Re: Interacting with an NSTask via pipes
  • Index(es):
    • Date
    • Thread