腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(443)
视频
沙龙
1
回答
将NSTask "/bin/sh -c“命令转换为正确的管道代码
objective-c
、
cocoa
、
nstask
有没有人可以帮我把下面的代码转换成有两个NSTasks表示"cat“和"grep”的代码,显示这两个NSTasks是如何通过管道连接在一起的?我想我更喜欢后一种方法,因为这样我就不必再担心引用和其他东西了。task = [[NSTask alloc] init];arguments = [NSArray arrayWithObjects: @"-c", @"cat /usr
浏览 0
提问于2011-06-05
得票数 2
回答已采纳
1
回答
AppleScript:调用外壳脚本的处理程序导致“无法识别的函数fileHandleForReading”
objective-c
、
macos
、
cocoa
、
bash
、
applescript
-- create pipe for standard output, and get reading file handle from it tell current application's
NSPipe
the following line is needed or logging ceases at this point setStandardInput_(current application's
NSPipe
's
浏览 0
提问于2012-12-10
得票数 3
回答已采纳
1
回答
运行NSUserUnixTask时异常`-[NSConcreteFileHandle readDataOfLength:]文件描述符`错误
objective-c
、
cocoa
、
nsfilehandle
在我的应用沙箱之前,我将
NSPipe
和NSTask结合使用,一切都正常,但现在NSUserUnixTask需要使用NSFileHandle,我认为我的问题很简单,因为我没有正确使用它。
浏览 0
提问于2013-05-20
得票数 3
回答已采纳
2
回答
如何使用多个命令运行NSTask
objective-c
、
nstask
‘ - (void) processByName:(NSString*)name {
NSPipe
*pipe1 = [
NSPipe
pipe]; [task1 setLaunchPath: @"/bin/ps"]; [task1 setStandardOutput: pipe1];
浏览 19
提问于2012-02-22
得票数 4
回答已采纳
1
回答
发布
NSPipe
Cocoa
cocoa
、
macos
、
pipe
是否有必要发布创建的
NSPipe
?实际上我不调用alloc,所以理论上我不应该调用release...Am,对吧?
浏览 2
提问于2011-04-11
得票数 1
回答已采纳
1
回答
使用NSTask执行外壳命令时,通过
NSPipe
输出的奇怪问题
objective-c
、
shell
、
command
、
nstask
、
nspipe
NSData *inputData = [myCmd dataUsingEncoding:NSUTF8StringEncoding];NSFileHandle*fh = [inPipe fileHandleForWriting];
NSPipe
*outPipe = [
NSPipe
pipe]; //
NSPipe
*errPipe = [
NSPipe
浏览 4
提问于2012-05-18
得票数 0
回答已采纳
1
回答
运行xcodebuild命令时出现快速错误
xcode
、
swift
、
macos
、
xcodebuild
、
xcrun
要在xcodebuild中运行below命令,我使用以下代码: let task = NSTask() task.arguments = args task.launch() tas
浏览 5
提问于2016-06-27
得票数 1
回答已采纳
1
回答
通过
NSPipe
或NSFileHandle将EOF发送到NSTask
cocoa
、
stdin
、
eof
、
nstask
、
nspipe
我有一个处理从标准输入传递的参数的NSTask。参数通过NSFileHandle传递。我不认为我可以将EOF符号添加到ASCII字符串中,那么有什么选择呢?任何反馈都很感谢!
浏览 6
提问于2013-07-19
得票数 0
回答已采纳
1
回答
NSTask实时监控输出
iphone
、
objective-c
、
macos
、
cocoa
、
nstask
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; pipe = [[
NSPipe
浏览 1
提问于2012-09-21
得票数 0
回答已采纳
1
回答
使用NSTask进行进程输出?
objective-c
、
nstask
我想得到NSTask输出,因为它似乎没有等待直到进程结束。我已经找到了,但是应该如何修改它以尽快获取数据呢?我认为我应该运行后台线程,并一直在等待输出。
浏览 2
提问于2014-05-29
得票数 1
回答已采纳
1
回答
我看不到NSTask - objective-c JAVA的输出
java
、
objective-c
、
nstask
、
alice
arrayWithObject:@"/applications/jarvis/brain/server.sh"]];
NSPipe
*outputPipeSetup = [
NSPipe
pipe];[setupTask setStandardOutputapplications
浏览 12
提问于2010-08-18
得票数 0
回答已采纳
2
回答
交互式Unix命令的可可包装器
objective-c
、
cocoa
、
unix
、
command-line-tool
、
interactive-mode
好的,我知道你可以用Objective-C做一个NSTask来运行命令行工具:task = [[NSTask alloc] init];[task launch];
浏览 4
提问于2012-06-15
得票数 9
回答已采纳
2
回答
NSTask挂在readDataToEndOfFile上
objective-c
、
nstask
NSPipe
*stderr = [
NSPipe
pipe]; task.standardError = stderr; task.standardInput = [
NSPipe
浏览 5
提问于2013-07-02
得票数 0
回答已采纳
1
回答
在Mac系统上检测框架的使用?
macos
、
cocoa
、
frameworks
、
dynamic-library
我想在OSX上开发样例框架,并要求框架在任何时间点只能由单个客户端使用,我不明白如何实现这一点?他们是否有API来检测框架是否正在使用?我们可以使用一些与文件相关的API吗?..我看过一个windows示例,其中他们使用以下API检测dylib的使用情况??CreateFileMappingW MapViewOfFile OpenFileMappingW
浏览 0
提问于2013-05-21
得票数 2
回答已采纳
2
回答
在objective-c中使用命令行运行格式化USB驱动器时出错
objective-c
、
macos
、
cocoa
、
command-line
、
command-line-arguments
全。我是新的mac开发人员。我想在objective-c中使用命令行格式化USB驱动器。这是一些代码,当我运行它时,它会给我错误。[task setLaunchPath:@"/usr/bin/env"]; [task setArguments:[NSArray arrayWithObjects:@"diskutil", @"eraseVolume",@"MS-DOS",@"PK", @"\"/Volumes/PK/\"",
浏览 0
提问于2013-05-06
得票数 2
2
回答
在Cocoa中获取shell脚本的输出
cocoa
、
nstextview
、
shell
有没有一种方法可以让我运行shell脚本,并在NSTextView中显示输出?我根本不需要用户对shell脚本的任何输入,因为它只是被调用来编译一堆文件。到目前为止,shell脚本部分运行得很好,但我就是不知道如何运行它并在NSTextView中显示输出。我知道可以使用NSTextView ()和NSTask运行shell脚本,但是如何将其输出到shell中呢?
浏览 0
提问于2010-05-16
得票数 2
回答已采纳
1
回答
NSTask通过管道将输出传送到控制台,而不是NSFileHandle
java
、
objective-c
、
nstask
、
nsfilehandle
NSPipe
* input =
NSPipe
.new;[serverTask换句话说,控制台打印的是输出,而不是我的
NSPipe
,后者只打印输出的新行的指示。
浏览 0
提问于2012-02-01
得票数 1
回答已采纳
2
回答
使用NSTask创建Git提交的“启动路径不可访问”
objective-c
、
cocoa
、
nstask
NSString *projectPath = @"file:///Users/MYNAME/Desktop/MYPROJECT/";
NSPipe
*pipe = [
NSPipe
projectPath;task.standardOutput = pipe; [task laun
浏览 5
提问于2017-04-23
得票数 1
回答已采纳
2
回答
带对象的可可内存管理NSArray
cocoa
、
memory-management
NSTask *task = [NSTask new];
NSPipe
*pipe = [
NSPipe
new]; [grep setStandardInput: pipe];pipe = [
NSPipe
new];谢谢你的帮助!
浏览 3
提问于2010-03-09
得票数 0
回答已采纳
1
回答
将值从NSTextField发送到不断运行的NSTask
objective-c
、
cocoa
、
nstask
server = [[NSTask alloc] init];NSArray *args = [NSArray arrayWithObjects:@"-Xms1024MsetArguments:args];[server setStandardInput:pipe];我已经阅读了
NSPipe
浏览 2
提问于2011-11-28
得票数 1
回答已采纳
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
热门
标签
更多标签
云服务器
即时通信 IM
ICP备案
对象存储
实时音视频
活动推荐
运营活动
广告
关闭
领券