• 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: NSTask, NSPipe's and interactive UNIX command
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTask, NSPipe's and interactive UNIX command


  • Subject: Re: NSTask, NSPipe's and interactive UNIX command
  • From: Nicola Vitacolonna <email@hidden>
  • Date: Thu, 3 Jan 2002 14:57:32 +0100

Buffering of stdout is line-buffered by default if the output file descriptor is a tty (or pty); otherwise, block buffered. stderr is by default unbuffered. The setvbuf() function is used to change the buffering mode. These are all standard BSD UNIX (and maybe general UNIX) things I've described here.

NSTask does not do any setting up of ttys/ptys for you. It wouldn't help in this case anyway since the printfs aren't printing out \n.

Ok, you can assume that my output actually prints \n in each printf(). My question is: is there a way to set up a pty in Cocoa using NSPipe and NSTask? Or should I use standard C libraries to do the job (I've been suggested to make a thread, use a standard read() and set up communication with NSConnection).

Regards,
Nicola


  • Follow-Ups:
    • Re: NSTask, NSPipe's and interactive UNIX command
      • From: Chris Kane <email@hidden>
References: 
 >Re: NSTask, NSPipe's and interactive UNIX command (From: Chris Kane <email@hidden>)

  • Prev by Date: NSDistributedNotification and [ notification object ]
  • Next by Date: Re: Unicode filename and FSPathMakeRef
  • Previous by thread: Re: NSTask, NSPipe's and interactive UNIX command
  • Next by thread: Re: NSTask, NSPipe's and interactive UNIX command
  • Index(es):
    • Date
    • Thread