是否可以在 iOS 上进行系统调用? [英] Is it possible to make system calls on iOS?

查看:36
本文介绍了是否可以在 iOS 上进行系统调用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以进行系统调用,例如执行 ls -la,并在您的应用中使用结果?

Is it possible to make a system call, such as executing ls -la, and use the result in your app?

推荐答案

通常,当有人说系统调用时,他们的意思是通过定义的入口点之一调用内核.虽然它在 iPhone 上在技术上是可行的,但你总是最好通过 libSystem 垫片,因为调用接口可能不稳定(例如它不在 Mac OS X 上).如果你这样做,我怀疑 Apple 会喜欢它,但我怀疑没有人真正考虑过它,他们也不太可能注意到.

Usually when someone says system call they mean calling into the kernel through one of the defined entry points. While its technically possible on iPhone, you are always better of going through the libSystem shims because the call interface is probably not stable (it isn't on Mac OS X for instance). I doubt Apple would like it if you did that, but I suspect no one as really thought about it much and they are unlikely to notice.

我不认为这就是你的意思.我认为您想使用 ISO/IEC 9899:1990 (C90) C 库函数系统".答案是否定的,你不能.

I don't think that is what you mean though. I think you want to use ISO/IEC 9899:1990 (C90) C libraray function "system". The answer to that is no, you can't.

这篇关于是否可以在 iOS 上进行系统调用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆