iPhone 重定向 shell 命令

发布于 2024-09-14 22:01:13 字数 179 浏览 2 评论 0原文

我正在开发一个越狱的 iPhone 应用程序,该应用程序调用 shell 命令。为了读取输出,我将命令的输出重定向到文件。这就是我的问题所在。当我尝试执行重定向时,sh 报告不允许该操作。这是 gdb 的确切输出:sh: ./tmp/tmp.out: 不允许操作 另外,我使用以下命令调用我的命令系统()函数。先感谢您

I am working on an jail broken iphone app that calls a shell command. To read the output I redirect the output of the command to file. That is where my problem lies. When I attempt to do the redirect sh reports that the operation is not permitted.this is the exact output of gdb: sh: ./tmp/tmp.out: Operation not permitted Also I call my command using the system() function. thank you in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

七分※倦醒 2024-09-21 22:01:13

您可能想使用 NSTask 是为这类事情而构建的。

You might instead want to use NSTask which is built for these sorts of things.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文