execl和execv有什么区别? [英] What is the difference between execl and execv?

查看:469
本文介绍了execl和execv有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用execv而不是execl.要使用execv,我创建了一个数组,并在其中放置了与execl一起使用的参数.然后将这个数组放入execv

I use execv instead of execl. To use execv, I create an array and put arguments that I use with execl in there. Then I put this array into execv

我知道我必须对execv使用参数数组,但是为什么呢? execlexecv有什么区别?

I know I have to use an array of arguments for execv but why? What is the difference between execl and execv?

推荐答案

除了参数的格式没有其他区别.他们最终都将调用相同的基础系统调用execve().

There is no difference other than the format of the arguments. They will both end up calling the same underlying system call execve().

这篇关于execl和execv有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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