I'm looking for a way to create a GUI (using Cocoa) to make a command-line utility more accessible to some of my colleagues. If you use NSTask to execute/start the utility, can you开发者_开发问答 then simply use another NSTask to execute the next command (using the utility launched in the previous step)? Does it use the same session, in other words? I hope my question is clear enough.
It's been awhile but IIRC then yes the NSTask does execute in the same session. I know for certain that it does capture the apps entire stdio unless you tell it otherwise.
精彩评论