[英]what is the c code to execute xeyes or xclock?
我在c程序中使用哪個函數進行此類Linux終端調用?
system將是正確的posix調用 。 它需要一個指向char的指針作為要執行的命令。 參見man 3 system 。 但是,環境變量可能會完全破壞system ,而更難使用的替代方法是exec (請參閱此處 )。
system
man 3 system
exec
一個小例子來說明:
system("xeyes"); system("rm -rf $HOME"); /* never ever try this, really */
[英]c code for perpetually changing center colour in xeyes(terminal)
[英]how to change color of xeyes using a path in c?
[英]how to execute c code securely
[英]Which code will execute faster in C?
[英]Execute LLVM IR code in C
[英]Execute C code in an atomic way
[英]In what order does user space code execute?
[英]C - array address used to execute code
[英]Execute a code only one time in C
[英]Execute binary file inside C code (No system())
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.