• 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 send commands via standardInput
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTask send commands via standardInput


  • Subject: Re: NSTask send commands via standardInput
  • From: Andrew Farmer <email@hidden>
  • Date: Sat, 27 Nov 2004 13:26:07 -0800

On 27 Nov 2004, at 12:58, René Korthaus wrote:
Hello everybody,

i am running an NSTask and while running i want to send commands to this task. I now googled half a day and only found this code:

NSString * commandString = [commandField stringValue]; // this is my command
/* this is what i found on the web */
NSData * commandToSend = [commandString dataUsingEncoding:NSUTF8StringEncoding];
[[[qemu standardInput] fileHandleForWriting] writeData:commandToSend];


I have a NSTextView where i see the output of the task, but when i send, lets say quit via the commandField (NSTextField), nothing happens to my task and the output says "qququiquit". That's with all commands i pass to the task.

Looks like the program in question uses readline or something to parse input. You may want to check to see if there's an option to turn this off.


What's the program?

Attachment: PGP.sig
Description: This is a digitally signed message part

 _______________________________________________
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: 
 >NSTask send commands via standardInput (From: RenĂ© Korthaus <email@hidden>)

  • Prev by Date: NSTask send commands via standardInput
  • Next by Date: Re: NSToolbarItem as Undo
  • Previous by thread: NSTask send commands via standardInput
  • Next by thread: Re: NSTask send commands via standardInput
  • Index(es):
    • Date
    • Thread