在c中使用execlp函数参数的问题 [英] problem in using execlp function parameters in c

查看:542
本文介绍了在c中使用execlp函数参数的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友。

i在linux OS中使用c中的execlp函数时有问题。



i设置它的第一个参数路径可执行文件和第二个参数到这样的文件名和否。这个代码没有执行程序有什么问题。



execl(home / davood / Desktop / a,。/ t2.exe, -la,NULL);



感谢朋友。

解决方案

Quote:

execl( home / davood / Desktop / a ,。/ t2.exe, - la,NULL);



可能你的意思是:



/ home / davood / Desktop / a


hi friend.
i have problem when using execlp function in c in linux OS.

i set the first parameter of it path of executable file and second parameter to name of file like this and else. what is wrong with this code that do not execute the program.

execl("home/davood/Desktop/a","./t2.exe","-la",NULL);

thanks friend.

解决方案

Quote:

execl("home/davood/Desktop/a","./t2.exe","-la",NULL);


Probably you meant:

/home/davood/Desktop/a


这篇关于在c中使用execlp函数参数的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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